Welcome to your JavaScript
Integer Variable is declared using following syntax in JavaScript
What will be output of following code into alert: "use strict"; myFunction(); function myFunction() { y = 3.14; alert("Value of y is " +y); }
How to create a Date object in JavaScript?
What is the special feature of the modern web applications? c. d.
Using _______ statement is how you test for a specific condition.
Choose the server-side JavaScript object?
What will be output ? function x() { document.write(2+5+"8"); }
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?
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 of the following is not a valid JavaScript variable name?
Why so JavaScript and Java have similar name?
Which of the following best describes JavaScript?
Which is correct way to get object index value.
Which is not an Javascript HTML event
What are variables used for in JavaScript Programs?
Which of the following can't be done with client-side JavaScript?
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
When a user views a page containing a JavaScript program, which machine actually executes the script?
What is the correct JavaScript syntax to write "Hello World"?
To change the style of an HTML element correct Syntax is
_____ JavaScript statements embedded in an HTML page can respond to user events such as mouse-clicks, form input, and page navigation.
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 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();
What will be output ?
JavaScript entities start with _______ and end with _________.
How does JavaScript store dates in a date object?
Time's up
Welcome to your PHP Test
What will be the output of the following php code? <?php $num = "1"; $num1 = "2"; print $num+$num1; ?>
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;
A PHP script should start with ___ and end with ___:
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?
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 of the following must be installed on your computer so as to run PHP script? i) Adobe Dreamweaver ii) PHP iii) Apache iv) IIS
The filesize() function returns the file size in ___.
What will be the output of the following PHP code ? <?php $color = red; echo "$color" . red ; ?>
If the directive session.cookie_lifetime is set to 3600, the cookie will live until..
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"; }
?>
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”);
Which one of the following statements is used to create a table?
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 method is used to retrieve the number of rows affected by an INSERT, UPDATE, or DELETE query?
“Array into array into array” is called as
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 function calc($price, $tax="") { $total = $price + ($price * $tax); echo "$total"; } calc(42); ?>
Which one of the following is the very first task executed by a session enabled page?
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 $fruits = array ("apple", "mango", "peach", "pear", "orange"); $subset = array_slice ($fruits, 2); print_r ($subset); ?>
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) ); ?>
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? Say your previous session username was nachi. unset($_SESSION['username']); printf("Username now set to: %s", $_SESSION['username']);
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"]; ?>
Which method retrieves each row from the prepared statement result and assigns the fields to the bound results?
Which of the methods are used to manage result sets using both associative and indexed arrays?
Which one of the following methods is responsible for sending the query to the database?
We can use ___ to comment a single line? i) /? ii) // iii) # iv) /* */
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(); ?>
Which one of the following function is used to start a session?
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 happen in this function call? <?php function calc($price, $tax) { $total = $price + $tax; } $pricetag = 15; $taxtag = 3; calc($pricetag, $taxtag); ?>
Which of the following statements invoke the exception class?
Which one of the following function is capable of reading a specific number of characters form a file?
Which one of the following statements should be used to include a file?
Who is the father of PHP?
Which one of the following is the right description for the method getMessage() ?
What will be the output of the following PHP code? <?php $a = 5; $b = 5; echo ($a === $b); ?>
If $a = 12 what will be returned when ($a == 12) ? 5 : 1 is executed?
Welcome to your jQuery Test
Which is not jQuery Slide method?
$.foo() is equivalent to..
jQuery's main focus is..
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
Which syntax is correct to hide DOM element using Callback function
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
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
AJAX and jQuery
jQuery is
With jQuery, look at the following selector: $("div"). What does it select?
The jQuery html() method works for both HTML and XML documents
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
Load remote data using HTTP GET
When referencing an HTML element preceded by a . (dot), what javascript function is this equivalent to?
The speed options can be applied to which jQuery functions?
Can we use selector into jquery ?
.$(function(){}); What does this piece of jQuery do?
Which is not used to display data into HTML ?
When referencing an HTML element preceded by a # (pound or hash), what javascript function is this equivalent to?
Look at the following jQuery selector: $("div #intro .head"). What does it select?
AJAX Stands for
What is the difference between .width() and .outerWidth()?
Why do we usually add the stop() method before calling animate()?
What is the correct jQuery code to set the background color of all p elements to red?
What is the difference between Hover and Mouseover
Which jQuery method is used to set one or more style properties for selected elements?
What are the various speed options?
Multiple document.ready blocks can be placed in a page without detriments. This statement is..
jQuery is a
Which jQuery method is used to switch between adding/removing one or more classes (for CSS) from selected elements?
With jQuery, look at the following selector: $("div.intro"). What does it select?
$(document).ready(function() { // Some code. }); The above code is used to..
What scripting language is jQuery written in?
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.
You can attach a handler to an event using which method?
What is not true about array methods?
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.
Which function do you reference in HTML form data?
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 ?
What are the :odd and :even filters?
Which jQuery method is used to perform an asynchronous HTTP request?
$('#masterList').find('li') .width(500).addClass('selected'); The phenomena occuring in the above code is called?
$('p').click(function(){ // Code here }); Inside the commented section, the value of the variable this is a..
Which jQuery method is used to hide selected elements?
How do you fetch the first span on the page, which has the class ‘green’?
var ps = $("p"); ps will be..
Which jQuery function is used to prevent code from running, before the document is finished loading?
When do you use the $(this) code?
If you want to stop your jQuery for a few milliseconds, which function do you use?
Welcome to your Yippee Technology Online Aptitude Test on C, HTML and CSS
HTML is what type of language ?
Which of the following property is used to capitalize text or convert text to uppercase or lowercase letters?
Which of the following selector selects all paragraph elements with a lang attribute?
choose the correct HTML tag to left align the content of cell horizontally ?
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]); }
#include #include 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
What is the correct HTML for referring to an external style sheet?
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);
Apart from tag, what other tag makes text bold ?
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); }
Tags and test that are not directly displayed on the page are written in _____ section.
what is mean by alt value in tag ?
what is empty elements in HTML
Which of the following is an attribute of
in HTML iframe is used to
What tag is used to display a picture in a HTML page?
Which of the following is illegal?
What is use of \r in c?
how to set picture as a background web page ?
Which of the following property is used to change the face of a font?
How do you insert a comment in a CSS file?
#include 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.
Consider c code int main(){ printf("%d",sizeof(3.8)); return 0; } Which of the following is true?
HTML web pages can be read and rendered by _________.
Which of the following selector matches all elements of a type?
Which of the following property is used to increase or decrease how bold or light a font appears?
#include main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); }
the element is container for
#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }
Which of the following is a way to associate styles with your HTML document?
How do you display hyperlinks without an underline?
What is return type of malloc() function?
Which of the following is correct about CSS?
Size of void pointer is
#include 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 do you add a background color for all
Which of the following property allows you to control the shape or appearance of the marker of a list?
which HTML tag is used to display the power of any expression ?
Which of the following is correct about Hex Code format of CSS colors?
#include 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
How can you make a bulleted list with numbers?
Which of the following property of a anchor element signifies an element that currently has the user's mouse pointer hovering over it?
which organization defines the web standards ?
What is the output of the following: #include 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
Which of the following property serves as shorthand for the padding properties?
How can you open a link in a new tab/browser window?
C Which type of files can’t be opened using fopen()?
If you want the table borders to collapse into one border, which property you will use ?
Welcome to your Yippee Technology Online Aptitude Test on C language
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};
The keyword used to transfer control from a function back to the calling function is
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.
only int and char data type is allowed in Union, Structures and Enums ?
Which of the following function is used to find the first occurrence of a given string in another string?
How would you round off a value from 1.66 to 2.0?
What will be the output of the program?
#include int main() { int y=128; const int x=y; printf("%d\n", x); return 0; }
int f1(int a, int b) { return ( f2(20) ); } int f2(int a) { return (a*a); }
which is true ?
While() and do.... While() loop both are same ?
How will you print \n on the screen?
How to get length of array a[20] ?
#include 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; }
A function cannot be defined inside the another function, but a function can be called inside a another function.
Point out the compile time error in the program given below.
#include int main() { int *x; *x=100; return 0; }
Is it true that too many recursive calls may result into stack overflow?
Which of these is not correct about file handling in c ?
In the following code, the P2 is Integer Pointer or Integer?
typedef int *ptr; ptr p1, p2;
Which of the following operations can be performed on the file "NOTES.TXT" using the below code?
FILE *fp; fp = fopen("NOTES.TXT", "r+");
Point out the error in the following program
#include int main() { display(); return 0; } void display() { printf("YippeeTechnology.com"); }
what is the scope of variable X, if we declared it in small loop?
Nested unions are allowed
How to join following two strings in C language ? char str1[]="Hello" , str2[]=" Yippeetechnology.com"
Which of the following special symbol allowed in a variable name?
What is the similarity between a structure, union and enumeration?
What will be the output of the program ?
#include 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; }
Names of functions in two different files linked together must be unique
Which of the declaration is correct?
Functions can be called either by value or reference
#include struct emp { char name[20]; int age; }; int main() { emp int xx; int a; printf("%d\n", &a); return 0; }
Point out the error in the following program.
#include int main() { void v = 0; printf("%d", v); return 0; }
Welcome to your Yipee Technology Online Aptitude Test 2
What is the correct JavaScript syntax to change the content of the HTML element below?
This is a demonstration.
What is the correct way to open the file "time.txt" as readable?
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.
CSS How do you add a background color for all
PHP Which one of the following is the right way to clone an object in PHP?
What is the time complexity of merge sort?(Best case)
Which superglobal variable holds information about headers, paths, and script locations?
Where can the super() appear in the base class?
HTML If the image cannot be displayed then _______ specifies an alternate text for an image.
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()); } }
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.
PHP allows you to send emails directly from a script
JVM is platform independent. A.True B.False
What is the correct way to end a PHP statement?
Which of the following approach is adapted by C++? A. Top-down B. Bottom-up C. Right-left D. Left-right
HTML C Which type of files can’t be opened using fopen()?
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.
How do you get information from a form that is submitted using the "get" method?
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
Be sure to click Submit Quiz to see your results!
Welcome to your Yipee Technology Online Aptitude Test
Is there any difference between primary key and unique with NOT NULL condition?
What does PHP stand for?
Answer True or False: main is keyword in Java.
A technique for direct search is
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?
What is the correct way to include the file "time.inc" in PHP?
The PHP syntax is most similar to:
#include void main(){ char *ptr=“abcd” char ch; ch = ++*ptr++; cout<<ch; } Output?
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"
Which of the following statements is false about objects?
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?
Consider c++ code given bellow and give output class abc { void f(); void g(); int x; }; main() { cout<<sizeof(abc)<<endl;
What is the correct way to create a function in PHP?
Which of the following statements is true?
PHP can be run on Microsoft Windows IIS(Internet Information Server):
How do you create an array in PHP?
Where Triggers are not allowed in MySQL database?
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"); }
What will be printed if this is written in main() printf("%.0f", 2.89);
Java: Which methods can access to private attributes of a class?
SQL: How many objects will be created in the following code? String s1="Welcome"; String s2="Welcome"; String s3="Welcome";
When using the POST method, variables are displayed in the URL: