About Us
Services
Branding
Web/App
Marketing
Packages
Strategy
Work
Login | Sign Up
test
Welcome
Fill the details & start your test
Name
Email
Q1. What is the output of following program?
void main(){
int a=2;
switch(a);
{
case 1: printf("A");
case 2: printf("B");
case 3: printf("C");
break;
case 4: printf("D");
default: printf("E");
break;
}
}
A B C
A B C E
A B C D E
error
Q2. What is the output of following program?
void f1(){
extern int g;
static int s=5;
int a;
++g;
a=s++;
printf("%d%d%d",a,s,g);
if(a<=6)
f1();
printf("%d%d%d",a,s,g);
}
void f2(){
static int s;
int a;
a=++s;
++g;
printf("%d%d%d",a,s,g);
if(a<=2)
f2();
printf("%d%d%d",a,s,g);
}
main(){
f1();
f2();
}
0 5 garbase
1 6 1
1 6 2
error
Q3. What is the output of following program?
void main(){
int a;
a=1;
while(a<=10){
printf("%d",a);
if(a>3 && a<8)
continue;
a++;
}
printf("%d",a+10);
}
1 2 3 4 5 6 ...................infinite
1 2 3 4 5 5 ...................infinite
1 2 3 4 4 4 ...................infinite
1 2 3 4 4 3 ...................infinite
Q4. What is the output of following program?
void abc(int a){
++a;
printf("%d",a);
}
void main(){
int a=10;
abc(++a);
abc(a++);
printf("%d",a);
}
11 12 12
11 12 13
12 12 12
12 12 13
Q5. What is the output of following program?
void main(){
float a;
a=8.5;
if(a==8.5)
printf("1");
else
printf("2");
}
1
2
error
none of these
Q6. Which of the following statements is true?
An exception can be thrown by throw keyword explicitly.
An exception can be thrown by throws keyword explicitly.
Q7. What happens when the following class is compiled and run.
public class test
{
public static void main(String args[])Â
{
int x = 0, y = 1, z;
if(x)Â
z = 0;
else
z = 1;
if(y)Â
 z = 2;
else
z = 3;
System.out.println(z);Â
}
}
The program prints 1
The program prints 2
The program prints 3
The program does not compile because of problems in the if statement.
Q8. Which all lines are part of the output when the following code is compiled and run.
public class test {
public static void main(String args[]) {
 for(int i = 0; i < 3; i++) {
for(int j = 3; j >= 0; j--) {
   if(i == j) continue;
   System.out.println(i + " " + j);
}
   }
 }
}
Â
a. 0 0Â
b. 0 1Â
c. 0 2Â
d. 0 3Â
e. 1 0Â
f. 1 1Â
g. 1 2Â
h. 1 3Â
i. 2 0Â
j. 2 1Â
k. 2 2Â
l. 2 3Â
a, b, c, d, e, i, j, k, l
b, c, d, e, g, h, i, j, l
b, c, e, j, k, l, f, h, i
c, d, e, f, g, h, i
Q9. What is the result of compiling and running this program?
public class testÂ
{
   public static void main(String args[])
   {
    int i, j;
    int k = 0;
    j = 2;
    k = j = i = 1;
    System.out.println(k);
 }
}
Â
The program does not compile as k is being read without being initialized.
The program does not compile because of the statement k = j = i = 1;
The program compiles and runs printing 1.
The program compiles and runs printing 2.
Q10. Which of these is a legal definition of a method named m assuming it throws IOException, and returns void. Also assume that the method does not take any arguments.
void m() throws IOException{}
void m() throw IOException{}
void m(void) throws IOException{}
void m() {} throws IOException
Q11. The output of following script would be:
$somerar=15; function ad it () { GLOBAL $somevar; $somerar++ ; echo "somerar is $somerar"; } addit ();
somerar is 1
somerar is 15
somerar is 16
somerar is $ somerar
Q12. Which of the following functions require the allow-url-fopen must be enabled?
require()
include()
both of above
None of above
Q13. Which function includes the specified file even the statement evaluates to false in which block the function is placed.
include ()
require ()
both of above
None of above
Q14. Trace the function that does continue the script execution even if the file inclusion fails
include ()
require ()
both of above
None of above
Q15. script is a ______.
Program or sequence of instruction that is interpreted or carried out by web server only
Program or sequence of instruction that is interpreted or carried out by another program
Program or sequence of instructions that is interpreted or carried out by processor directly
None of above
Q16. Which of the following variables is not a predefined variable?
$request
$ask
$get
$post
Q17. Which of the following delimiting method is known as string Interpolation.
delimited by single quote
delimited by <<< identifier
delimited by double quote
All of above
Q18. Which of the following best describes JavaScript?
a low-level programming language.
a scripting language pre-compiled in the browser.
a compiled scripting language.
an object-oriented scripting language.
Q19. JavaScript entities start with _______ and end with _________.
Semicolon, colon
Semicolon, Ampersand
Ampersand, colon
Ampersand, semicolon
Q20. What is the output of the following code snippet? typeof ([]), typeof (new Array())
"array", "object"
"object", "array"
array", "array"
"object", "object"
Q21. __ returns true if a variable is an array, if not false.
Array.isArray()
Array.of()
Array.from()
Array.observe()
Q23. AJAX stand for________
Alternate java script and XML
Asynchronous java script and XML
Asynchronous java and XML
None of these
Q24. Which of the following event fires when the form element loses the focus:
<button>, <input>, <select>, <textarea>?
onfocus
onblur
onclick
ondblclick
Q25. Using _______ statement is how you test for a specific condition.
Select
If
Switch
For
Time is Up!
error:
Content is Copyright and protected !!
Login
Sign Up
Remember me
Forgot Password?
Sign In
I accept the
Terms of Service and Privacy Policy
Sign Up
Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.
Email Reset Link
Remember Me
Log In
Lost your password?