Time remaining
:
:
Test Status
CRANDOMTEST
Ques 1 :
How many times the below loop will get executed?
main()
{
int i;
for(i=20, i=10; i<=20; i++)
{
printf("\n %d", i);
}
}
(A) 1
(B) Run time Error
(C) 11
(D) Compilation Error
Ques 2 :
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) A B C
(B) A B C E
(C) A B C D E
(D) error
Ques 3 :
Which one of the following functions is the correct choice for moving blocks of binary data that are of arbitrary size and position in memory?
(A) memset()
(B) memcpy()
(C) strncpy()
(D) memmove()
Ques 4 :
What is the output of following program?
void main(){
int a;
a=1;
while(a<=1)
if(a%2)
printf("%d",a++);
else
printf("%d",++a);
printf("%d",a+10);
}
(A) 0 11
(B) 0 12
(C) 1 11
(D) 1 12
Ques 5 :
What will be output when you will execute following code?
void main()
{
printf("%d",10?0?20?35:45:55:65);
}
(A) 35
(B) 45
(C) 55
(D) 65
Ques 6 :
What the below statement will print if a=10
printf("%d %d",a, !a++);
(A) 11 0
(B) 10 10
(C) 10 0
(D) 0 10
Ques 7 :
What is the output of following program?
void main(){
printf("%d%d",sizeof(10),sizeof(5,5));
}
(A) 2 2
(B) 2 4
(C) 2 6
(D) 2 8
Ques 8 :
What is the output of the following code?
#include"stdio.h"
main()
{
int i;
for(i=0;i<5;i++)
{
static int a=0;
int b=0;
a++;
b++;
printf("%d %d",a,b);
}
return 0;
}
(A) 1 1 2 1 3 1 4 1
(B) 1 1 2 1 3 1 4 1 5 1
(C) 1 0 2 0 3 1 4 1 5 1
(D) 0 1 2 0 3 1 4 1 5 1
Ques 9 :
What is the output of following program?
void main(){
int i;
for(i=1;i++<=1;i++)
for(i++;i++<=6;i++)
i++;
printf("%d",i);
}
(A) 11
(B) 12
(C) 13
(D) none of these
Ques 10 :
What is the output of following program?
void main(){
int a;
a=453>>16;
printf("%d",a);
}
(A) 0
(B) 1
(C) -1
(D) none of these
Ques 11 :
How many variables scopes are there in "C" language?
(A) 2
(B) 3
(C) 4
(D) 5
Ques 12 :
What is the output of the following code?
#include "stdio.h"
main(){
static int s;
++s;
printf("%d",s);
if(s<=3)
main();
printf("%d",s);
return 0;
}
(A) 1 2 3 4 4 4 4 4
(B) 0 1 2 3 4 4 4 4
(C) 1 2 3 3 4 4 4 4
(D) 0 1 3 4 4 4 4 4
Ques 13 :
Suppose a,b,c are integer variables with values 5,6,7 respectively. What is the value of the expression:
!((b+c)>(a+10))
(A) 1
(B) 6
(C) 15
(D) 0
Ques 14 :
Can a program be invoked from another program ?
(A) True
(B) False
Ques 15 :
what is the output of following program?
main(){
int a,b;
a=b=100;
scanf("%d%d",a,&b);
//Entered Values are 40 85
printf("%d %d",a,b);
}
(A) 40 85
(B) 0 85
(C) 100 85
(D) 100 100
Ques 16 :
How many storage class specifiers in "C" language?
(A) 3
(B) 4
(C) 5
(D) 6
Ques 17 :
what is the output of following program?
void main(){
int a;
a=1;
while(a-->=1)
while(a-->=0);
printf("%d",a);
}
(A) 3
(B) -3
(C) 0
(D) error
Ques 18 :
What will be output of the following program?
#include<stdio.h>
int main(){
int x;
x=10,20,30;
printf("%d",x);
return 0;
}
(A) 10
(B) 30
(C) 30
(D) 0
Ques 19 :
How many times the while loop will get executed?
main ( )
{
int a = 1 ;
while ( a <= 100) ;
{
printf ( "%d", a++ ) ;
}
}
(A) 100
(B) 1
(C) 0
(D) Infinite
Ques 20 :
int testarray[3][2][2] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
What value does testarray[2][1][0] in the sample code above contain?
(A) 3
(B) 5
(C) 7
(D) 11
Submit Answer
Don't Refresh the Page !! ...