Welcome to your JavaScript
What will be output ? <script language="javascript"> function x() { document.write(2+5+"8"); } </script>
_____ JavaScript statements embedded in an HTML page can respond to user events such as mouse-clicks, form input, and page navigation.
To change the style of an HTML element correct Syntax is
When a user views a page containing a JavaScript program, which machine actually executes the script?
Which of the following can't be done with client-side JavaScript?
Which is correct Syntax to sort numerical array alphabetically array is : var points = [40, 100, 1, 5, 25, 10]; I. points.sort(function(a, b){return a - b}); II. points.sort(function(a, b){return b - a}); III. points.sort();
How to create a Date object in JavaScript?
How does JavaScript store dates in a date object?
What will be output of following code into alert: "use strict"; myFunction(); function myFunction() { y = 3.14; alert("Value of y is " +y); }
Which is correct way to get object index value.
What is not true about try-catch block? I. The try statement allows you to define a block of code to be tested for errors while it is being executed II. The catch statement allows you to define a block of code to be executed, if an error occurs in the try block III. try {Block of code to try } catch( Exception err){ message.innerHTML = "Input is " + err; } IV. The finally statement lets you execute code, after try and catch, regardless of the result
Integer Variable is declared using following syntax in JavaScript
Which is true about string methods ? I. The indexOf() method returns the index of the first occurrence of a specified text in a string II. The lastIndexOf() method returns the index of the last occurrence of a specified text in a string III. Both the indexOf(), and the lastIndexOf() methods return -1 if the text is not found
Which is not an Javascript HTML event
Using _______ statement is how you test for a specific condition.
Consider the following code snippet const pi=3.14; var pi=4; console.log(pi); What will be the output for the above code snippet?
What are variables used for in JavaScript Programs?
Which of the following is not a valid JavaScript variable name?
What is the special feature of the modern web applications? c. d.
JavaScript entities start with _______ and end with _________.
What will be output ? <h1 onclick="changeText(this)">Click on this text!</h1> <script> function changeText(id) { id.innerHTML = "Ooops!"; } </script>
Choose the server-side JavaScript object?
What is the correct JavaScript syntax to write "Hello World"?
What is not true about String Functions? I. slice(), substring(), substr() are methods for extracting a part of a string II. If a parameter is negative, the position is counted from the end of the string III. If you omit the second parameter, the method will slice out the rest of the string IV. substring() is not similar to slice() and substring() cannot accept negative indexes.
Which of the following best describes JavaScript?
Why so JavaScript and Java have similar name?
Time's up
Welcome to your PHP Test
What will be the output of the following PHP code? <?php $fruits = array ("apple", "mango", "peach", "pear", "orange"); $subset = array_slice ($fruits, 2); print_r ($subset); ?>
Which one of the following is the right description for the method getMessage() ?
Who is the father of PHP?
What will be the output of the following PHP code? <?php $op2 = "blabla"; function foo($op1) { echo $op1; echo $op2; } foo("hello"); ?>
Which one of the following statements should be used to include a file?
Which one of the following methods is responsible for sending the query to the database?
What will be the output of the following PHP code? <?php $num = 10; echo 'What is her age? \n She is $num years old'; ?>
What will be the output of the following PHP code ? <?php $color = red; echo "$color" . red ; ?>
What will be the output of the following php code? <?php $num = "1"; $num1 = "2"; print $num+$num1; ?>
Which one of the following function is capable of reading a specific number of characters form a file?
Which of the following must be installed on your computer so as to run PHP script? i) Adobe Dreamweaver ii) PHP iii) Apache iv) IIS
A PHP script should start with ___ and end with ___:
If $a = 12 what will be returned when ($a == 12) ? 5 : 1 is executed?
Which of the following statements invoke the exception class?
If the directive session.cookie_lifetime is set to 3600, the cookie will live until..
We can use ___ to comment a single line? i) /? ii) // iii) # iv) /* */
What will be the output of the following PHP code? <?php function calc($price, $tax="") { $total = $price + ($price * $tax); echo "$total"; } calc(42); ?>
What will be the output of the following PHP code? <?php $a = 5; $b = 5; echo ($a === $b); ?>
Which one of the following method is used to retrieve the number of rows affected by an INSERT, UPDATE, or DELETE query?
Which of the methods are used to manage result sets using both associative and indexed arrays?
Which of the following are correct ways of creating an array? i) state[0] = “karnataka”; ii) $state[] = array(“karnataka”); iii) $state[0] = “karnataka”; iv) $state = array(“karnataka”);
What will be the output of the following PHP code? Say your previous session username was nachi. unset($_SESSION['username']); printf("Username now set to: %s", $_SESSION['username']);
Which one of the following statements is used to create a table?
Which one of the following function is used to start a session?
“Array into array into array” is called as
The filesize() function returns the file size in ___.
Which function is used to erase all session variables stored in the current session?
What will be the output of the following PHP code? <?php $state = array ("Karnataka", "Goa", "Tamil Nadu", "Andhra Pradesh"); echo (array_search ("Tamil Nadu", $state) ); ?>
What will happen in this function call? <?php function calc($price, $tax) { $total = $price + $tax; } $pricetag = 15; $taxtag = 3; calc($pricetag, $taxtag); ?>
Which one of the following function outputs the contents of a string variable to the specified resource?
Which function will return true if a variable is an array or false if it is not?
Which method retrieves each row from the prepared statement result and assigns the fields to the bound results?
What will be the output of the following PHP code?
<?php
$team = "arsenal";
switch ($team) {
case "manu": echo "I love man u";
case "arsenal": echo "I love arsenal";
case "manc": echo "I love manc"; }
?>
If you want to temporarily store uploaded files in the /tmp/phpuploads/ directory, which one of the following statement will you use?
What will be the output of the following php code? <?php $states = array("karnataka" => array ( "population" => "11,35,000", "captial" => "Bangalore"), "Tamil Nadu" => array( "population" => "17,90,000", "captial" => "Chennai") ); echo $states["karnataka"]["population"]; ?>
74. Which of the following php statement/statements will store 111 in variable num? i) int $num = 111; ii) int mum = 111; iii) $num = 111; iv) 111 = $num;
What will be the output of the following PHP code? <?php $a = array("a"=>"red", "b"=>"green", "c"=>"blue"); echo array_shift($a); print_r ($a); ?>
Which one of the following is the very first task executed by a session enabled page?
Which one of the following statements should you use to set the session username to YIPPEE?
What will be the output of the following PHP code? <?php function a() { function b() { echo 'I am b'; } echo 'I am a'; } b(); a(); ?>
Welcome to your jQuery Test
What is not true about array methods?
jQuery's main focus is..
What is the correct jQuery code to set the background color of all p elements to red?
$('p').click(function(){ // Code here }); Inside the commented section, the value of the variable this is a..
Look at the following jQuery selector: $("div #intro .head"). What does it select?
When referencing an HTML element preceded by a . (dot), what javascript function is this equivalent to?
What is the difference between Hover and Mouseover
Which is not true for math function? I.ceil(x) returns the value of x roundedDown to its nearest integer II. floor(x) returns the value of x roundedUp to its nearest integer III. abs(x) returns the absolute (positive) value of x IV. exp(x) returns the value of Ex
Load remote data using HTTP GET
Which jQuery function is used to prevent code from running, before the document is finished loading?
When referencing an HTML element preceded by a # (pound or hash), what javascript function is this equivalent to?
AJAX and jQuery
jQuery is
What are the :odd and :even filters?
Which is not used to display data into HTML ?
jQuery Stop() function is used to I. Stop execution of current fading effect II. Stop execution of current sliding effect III. Stop the execution of all DOM action events
$('#masterList').find('li') .width(500).addClass('selected'); The phenomena occuring in the above code is called?
$(document).ready(function() { // Some code. }); The above code is used to..
var ps = $("p"); ps will be..
Which jQuery method is used to perform an asynchronous HTTP request?
Which is not jQuery Slide method?
What are the various speed options?
The jQuery html() method works for both HTML and XML documents
Which jQuery method is used to switch between adding/removing one or more classes (for CSS) from selected elements?
JavaScript statements are executed line by line. However, with effects, the next line of code can be run even though the effect is not finished. This can create errors. To prevent this, you can use
How do you fetch the first span on the page, which has the class ‘green’?
What is the difference between .width() and .outerWidth()?
into jQuery, I. The load() method loads data from a server and puts the returned data into the selected element. II. The load() method loads data from a client machine and puts the data into the selected element. III. The load() method loads data from a server and clients and puts the returned data into the specified element.
.$(function(){}); What does this piece of jQuery do?
AJAX Stands for
jQuery is a
Which are valid general rules for constructing names for variables I. Names can contain letters, digits, underscores, and dollar signs. II. Names must begin with a letter III. Names can also begin with $ and _ (but we will not use it in this tutorial) IV. Names are case sensitive (y and Y are different variables)V.Reserved words (like JavaScript keywords) cannot be used as names V. Reserved words (like JavaScript keywords) cannot be used as names
With the jQuery AJAX methods, you can request text, HTML, XML, or JSON from a remote server using both HTTP Get and HTTP Post - And you can load the external data directly into the selected HTML elements of your web page ?
Which jQuery method is used to set one or more style properties for selected elements?
With jQuery, look at the following selector: $("div.intro"). What does it select?
Which jQuery method is used to hide selected elements?
Can we use selector into jquery ?
The speed options can be applied to which jQuery functions?
Multiple document.ready blocks can be placed in a page without detriments. This statement is..
Why do we usually add the stop() method before calling animate()?
If you want to stop your jQuery for a few milliseconds, which function do you use?
Which is true while traversing sideways in the DOM tree? I. The next() method returns the next sibling element of the selected element II. The next() method returns all next subsibling elements of the selected element III. The nextUntil() method returns all next sibling elements between two given arguments IV. The nextUntil() method returns all next subsibling elements between two given arguments.
What scripting language is jQuery written in?
Which function do you reference in HTML form data?
With jQuery, look at the following selector: $("div"). What does it select?
When do you use the $(this) code?
$.foo() is equivalent to..
You can attach a handler to an event using which method?
Which syntax is correct to hide DOM element using Callback function
Welcome to your Yippee Technology Online Aptitude Test on C, HTML and CSS
what is mean by alt value in <img> tag ?
Which of the following property serves as shorthand for the padding properties?
#include<stdio.h> int main() { int a=10; void f(); a = f(); printf("%d\n", a); return 0; } void f() { printf("Hi"); } A. Error: Not allowed assignment B. Error: Doesn't print anything C. No error D. None of above
Which of the following property is used to increase or decrease how bold or light a font appears?
#include<stdio.h> int main(){ int i,j; i=j=2,3; while(--i&&j++) printf("%d %d",i,j); return 0; } A.1 3 B.2 3 C.1 2 D.1 2 3
how to set picture as a background web page ?
Which of the following property allows you to control the shape or appearance of the marker of a list?
What is return type of malloc() function?
Which of the following selector selects all paragraph elements with a lang attribute?
Consider c code int main(){ printf("%d",sizeof(3.8)); return 0; } Which of the following is true?
Apart from <b> tag, what other tag makes text bold ?
the <head> element is container for
which HTML tag is used to display the power of any expression ?
Which of the following is illegal?
Tags and test that are not directly displayed on the page are written in _____ section.
Which of the following is correct about CSS?
What is the correct HTML for referring to an external style sheet?
void main() { char s[ ]="man"; int i; for(i=0;s[ i ];i++) printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]); }
Which of the following property of a anchor element signifies an element that currently has the user's mouse pointer hovering over it?
What is the output of this C code? void foo(float *); int main(){ int i = 10, *p = &i; foo(&i); } void foo(float *p) { printf("%f\n", *p); }
Which of the following is a way to associate styles with your HTML document?
Which of the following property is used to change the face of a font?
What is the output of the following: #include<stdio.h> int fun(int count) { printf("%d\n", count); if(count < 3) { fun(fun(fun(++count))); } return count; } int main() { fun(1); return 0; } A. 1 2 3 3 3 3 3 B. 1 2 3 C. 1 2 2 2 2 2 2 D. 1 2
Size of void pointer is
<td>.....</td> tag is used for ______?
HTML is what type of language ?
How do you insert a comment in a CSS file?
which organization defines the web standards ?
#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }
what is empty elements in HTML
What tag is used to display a picture in a HTML page?
C Which type of files can’t be opened using fopen()?
Which of the following is correct about Hex Code format of CSS colors?
Which of the following property is used to capitalize text or convert text to uppercase or lowercase letters?
How do you display hyperlinks without an underline?
Which of the following selector matches all elements of a type?
If you want the table borders to collapse into one border, which property you will use ?
What is use of \r in c?
in HTML iframe is used to
How can you open a link in a new tab/browser window?
#include <iostream> using namespace std; class B { public: void display() { cout<<"Content of base class.\n"; } }; class D : public B { public: void display() { cout<<"Content of derived class.\n"; } }; int main() { B *b; D d; b->display(); b = &d; /* Address of object d in pointer variable */ b->display(); return 0; } A.Content of base class. Content of base class. B.Content of base class. Conitent of derived class. C.Content of derived class. Content of base class. D.Conitent of derived class. Conitent of derived class.
#include main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); }
choose the correct HTML tag to left align the content of cell horizontally ?
Can you combine the following two statements into one? char *p; p = (char*) malloc(100); A. char p = *malloc(100); B. char *p = (char) malloc(100); C. char *p = (char*)malloc(100); D. char *p = (char *)(malloc*)(100);
HTML web pages can be read and rendered by _________.
How can you make a bulleted list with numbers?
#include<stdio.h> #include<conio.h> int main(){ void (*p)(); int (*q)(); int (*r)(); p = clrscr; q = getch; r = puts; (*p)(); (*r)("cquestionbank.blogspot.com"); (*q)(); return 0; } (A) NULL (B) cquestionbank.blogspot.com (C) c (D) Compilation error (E) None of above
Which of the following is an attribute of <table>tag ?
How do you add a background color for all <h1> HTML elements?
Welcome to your Yippee Technology Online Aptitude Test on C language
Names of functions in two different files linked together must be unique
What is the similarity between a structure, union and enumeration?
int f1(int a, int b) { return ( f2(20) ); } int f2(int a) { return (a*a); }
While() and do.... While() loop both are same ?
Is it true that too many recursive calls may result into stack overflow?
1. struct book { char name[10]; float price; int pages; }; 2. long int l = 2.35; 3. enum day {Sun, Mon, Tue, Wed};
1. struct book { char name[10]; float price; int pages; }; 2.
long int l = 2.35; 3.
enum day {Sun, Mon, Tue, Wed};
#include<stdio.h> struct emp { char name[20]; int age; }; int main() { emp int xx; int a; printf("%d\n", &a); return 0; }
only int and char data type is allowed in Union, Structures and Enums ?
what is the scope of variable X, if we declared it in small loop?
Which of the following operations can be performed on the file "NOTES.TXT" using the below code?
FILE *fp; fp = fopen("NOTES.TXT", "r+");
How would you round off a value from 1.66 to 2.0?
The keyword used to transfer control from a function back to the calling function is
Nested unions are allowed
Which of these is not correct about file handling in c ?
What will be the output of the program ?
#include<stdio.h> int main() { int x=30, *y, *z; y=&x; /* Assume address of x is 500 and integer is 4 byte size */ z=y; *y++=*z++; x++; printf("x=%d, y=%d, z=%d\n", x, y, z); return 0; }
#include<stdio.h> int main() { int a[5] = {5, 1, 15, 20, 25}; int i, j, m; i = ++a[1]; j = a[1]++; m = a[i++]; printf("%d, %d, %d", i, j, m); return 0; }
Point out the error in the following program.
#include<stdio.h> int main() { void v = 0; printf("%d", v); return 0; }
which is true ?
Point out the error in the following program
#include<stdio.h> int main() { display(); return 0; } void display() { printf("YippeeTechnology.com"); }
Functions can be called either by value or reference
How to get length of array a[20] ?
What will be the output of the program?
#include<stdio.h> int main() { int y=128; const int x=y; printf("%d\n", x); return 0; }
Point out the compile time error in the program given below.
#include<stdio.h> int main() { int *x; *x=100; return 0; }
A function cannot be defined inside the another function, but a function can be called inside a another function.
How will you print \n on the screen?
In the following code, the P2 is Integer Pointer or Integer?
typedef int *ptr; ptr p1, p2;
Which of the following function is used to find the first occurrence of a given string in another string?
How to join following two strings in C language ? char str1[]="Hello" , str2[]=" Yippeetechnology.com"
Is it true ? A function cannot return more than one value at a time, because after returning a value the control is given back to calling function.
Which of the declaration is correct?
Which of the following special symbol allowed in a variable name?
Welcome to your Yipee Technology Online Aptitude Test 2
Which superglobal variable holds information about headers, paths, and script locations?
JAVA: What will be the output of the program? public class Foo { public static void main(String[] args) { try { return; } finally { System.out.println( "Finally" ); } } } A. Finally B. Compilation fails. C. The code runs with no output. D. An exception is thrown at runtime.
Where can the super() appear in the base class?
HTML C Which type of files can’t be opened using fopen()?
Java: class A { int i; void display() { System.out.println(i); } } class B extends A { int j; void display() { System.out.println(j); } } class inheritance_demo { public static void main(String args[]) { B obj = new B(); obj.i=1; obj.j=2; obj.display(); } } a) 0 b) 1 c) 2 d) Compilation Error
Which of the following approach is adapted by C++? A. Top-down B. Bottom-up C. Right-left D. Left-right
How do you get information from a form that is submitted using the "get" method?
What is the time complexity of merge sort?(Best case)
JAVA: When compiler provides default constructor? A. Only if there is no explicit constructor defined by developer. B. Each time. C. Only when there is an explicit constructor defined by developer. D. Never.
HTML If the image cannot be displayed then _______ specifies an alternate text for an image.
PHP Which one of the following is the right way to clone an object in PHP?
Which of the following statements is correct? A. Base class pointer cannot point to derived class. B. Derived class pointer cannot point to base class. C. Pointer to derived class cannot be created. D. Pointer to base class cannot be created.
What will be the output of the following class equality { int x; int y; boolean isequal() { return(x == y); } } class Output { public static void main(String args[]) { equality obj = new equality(); obj.x = 5; obj.y = 5; System.out.println(obj.isequal()); } }
What is the correct JavaScript syntax to change the content of the HTML element below? <p id="demo">This is a demonstration.</p>
JVM is platform independent. A.True B.False
What is the correct way to end a PHP statement?
What is the correct way to open the file "time.txt" as readable?
CSS How do you add a background color for all <h1> HTML elements?
PHP allows you to send emails directly from a script
Be sure to click Submit Quiz to see your results!
Welcome to your Yipee Technology Online Aptitude Test
Answer True or False: main is keyword in Java.
Java: Which methods can access to private attributes of a class?
A technique for direct search is
Which of the following statements is false about objects?
Is there any difference between primary key and unique with NOT NULL condition?
When using the POST method, variables are displayed in the URL:
What is the correct way to create a function in PHP?
What will be printed if this is written in main() printf("%.0f", 2.89);
What will be output if you will compile and execute the following c code? void main(){ int i=10; static int x=i; if(x==i) printf("Equal"); else if(x>i) printf("Greater than"); else printf("Less than"); }
Where Triggers are not allowed in MySQL database?
#include void main(){ char *ptr=“abcd” char ch; ch = ++*ptr++; cout<<ch; } Output?
Consider c++ code given bellow and give output class abc { void f(); void g(); int x; }; main() { cout<<sizeof(abc)<<endl;
Find the output of following c code. #include int main(){ printf("C\question\bank"); return 0;
Consider c code #define power(a) #a int main(){ printf("%d",*power(432)); return 0; } What will be printed?
What does PHP stand for?
What is the correct way to include the file "time.inc" in PHP?
PHP can be run on Microsoft Windows IIS(Internet Information Server):
SQL: How many objects will be created in the following code? String s1="Welcome"; String s2="Welcome"; String s3="Welcome";
How do you create an array in PHP?
Which of the following statements is true?
The PHP syntax is most similar to:
Consider c++ code given bellow and give output using namespace std; main(){ short unsigned int i = 0; cout<<i--;
Include files must have the file extension ".inc"
If I don't provide any arguments on the command line, then the String array of main method will be empty or null or both?