Time remaining
:
:
Test Status
CRANDOMTEST
Ques 1 :
What is the output of following program?
void abc(int a){
++a;
}
void main(){
int a=10;
abc();
abc();
printf("%d",a);
}
(A) 10
(B) 11
(C) 12
(D) 13
Ques 2 :
What is the output of the following program?
void main(){
int a;
a=3+5*5+3;
printf("%d",a);
}
(A) 43
(B) 64
(C) 31
(D) none of these
Ques 3 :
What is the output of the following code?
#include "stdio.h"
extern int a;
main(){
void fun();
printf("\n a=%d",a);
fun();
return 0;
}
int a=7;
void fun(){
printf("\n in fun a=%d",a);
}
(A) a=0 in fun a=0
(B) a=7 in fun a=7
(C) a=7 in fun a=0
(D) error
Ques 4 :
What is the output of the following code?
#include "stdio.h"
extern int a=5;
main(){
void fun();
printf("\n a=%d",a);
fun();
return 0;
}
int a;
void fun(){
printf("\n in fun a=%d",a);
}
(A) a=0 in fun a=5
(B) a=5 in fun a=0
(C) a=5 in fun a=5
(D) error
Ques 5 :
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 6 :
What is the output of the following code?
#include "stdio.h"
int a;
main(){
printf("\n a= %d",a);
return 0;
}
(A) a=0
(B) a=garbage value
(C) error
(D) none of these
Ques 7 :
How many times the below loop will get executed?
main()
{
int i,j;
i = 10;
for (j=i==10 ; j<=10 ; j++)
{
printf(â??\n%dâ??,j);
}
}
(A) 1
(B) 10
(C) 11
(D) infinite loop
Ques 8 :
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 9 :
What will be output of the following c program?
#include "stdio.h"
int main()
{
int _ = 5;
int __ = 10;
int ___;
___ = _ + __;
printf("%i", ___);
return 0;
}
(A) 5
(B) 10
(C) 15
(D) Compilation Error
Ques 10 :
What will be output when you will execute following c code?
#include<stdio.h>
{
char arr[11]="The African Queen";
printf("%s", arr);
return 0;
}
Choose all that
(A) The African
(B) The
(C) Compilation
(D) None of the aboce
Ques 11 :
What is the output of following program?
void main(){
int a=1;
a=a<<15;
printf("%d",a);
}
(A) 32767
(B) -32767
(C) 32768
(D) -32768
Ques 12 :
What will be output of following program?
#include<stdio.h>
int main()
{
int a = 320;
char *ptr;
ptr = (char *)&a;
printf("%d",*ptr);
return 0;
}
(A) 2
(B) 320
(C) 64
(D) Compilation Error
Ques 13 :
What will be the output of the following program
main( )
{
int pskills[] = { 10, 20, 30, 40, 50 };
int i, *ptr ;
ptr = pskills;
for ( i = 0 ; i <4 ; i++ )
{
fun(ptr++);
printf ("\n%", *ptr ) ;
}
}
void fun(int *i)
{
*i = *i + 1;
}
(A) 11 21 31 41
(B) 20 30 40 50
(C) 21 31 41 51
(D) 10 20 30 40
Ques 14 :
Which one of the given option is correct?
void main()
{
int i;
i=2;
pskills:
printf("%d",i);
i=i+2;
if(i<=20)
goto pskills;
}
(A) 3 5 7 9 ....... 21 23
(B) 2 4 6 8 ....... 20
(C) 3 5 7 9 ....... 21
(D) 2 4 6 8 ....... 20 22
Ques 15 :
What is the output of the following program?
void main(){
a=3.5;
printf("%d",a);
}
(A) 3.5
(B) 3
(C) error
(D) garbage
Ques 16 :
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
(B) B D
(C) B E
(D) error
Ques 17 :
What is the output of following program?
void main(){
int a;
a='a'>'A';
printf("%d",a);
}
(A) 0
(B) 1
(C) garbage
(D) none of these
Ques 18 :
What is the output of following program?
void main(){
int a=2;
switch(a)
{
case 4: printf("A");
break;
case 3: printf("B");
case default : printf("C");
case 1 : printf("D");
break;
case 5 : printf("E");
}
}
(A) C
(B) C D
(C) E
(D) error
Ques 19 :
How many storage class specifiers in "C" language?
(A) 3
(B) 4
(C) 5
(D) 6
Ques 20 :
what is the output of following program?
void main(){
int a=1;
void xyz(int , int);
xyz(++a,a++);
xyz(a++,++a);
printf("%d",a);
}
void xyz(int x, inty){
printf("%d%d",x,y);
}
(A) 3 1 3 4 5
(B) 3 1 4 4 5
(C) 3 1 4 4 4
(D) 3 1 4 5 5
Submit Answer
Don't Refresh the Page !! ...