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