Time remaining
:
:
Test Status
CRANDOMTEST
Ques 1 :
What is the output of the following program?
void main(){
int a,b;
a=b=1;
a=a++ + ++b;
b=b++ + ++a;
printf("%d%d",a,b);
}
(A) 4 7
(B) 5 7
(C) 4 8
(D) 5 8
Ques 2 :
What will be the output of the following program?
main()
{
printf(3+â??Gyantonicâ??+4);
}
(A) ntonic
(B) tonic
(C) ic
(D) nic
Ques 3 :
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 4 :
What will be output when you will execute following c code?
#include<stdio.h>
int main(){
signed x,a;
unsigned y,b;
a=(signed)10u;
b=(unsigned)-10;
y = (signed)10u + (unsigned)-10;
x = y;
printf("%d %u\t",a,b);
if(x==y)
printf("%d %d",x,y);
else if(x!=y)
printf("%u %u",x,y);
return 0;
}
(A) 10 -10 0 0
(B) 10 -10 65516 -10
(C) 10 65526 0 0
(D) 10 -10 10 -10
Ques 5 :
What is the output of the following program?
void main(){
printf("2+3=%d",2+3);
}
(A) 2+3=0
(B) 2+3=2+3
(C) 2+3=5
(D) 5=2+3
Ques 6 :
What will be the output
main()
{
int i;
i = 10;
if(i == 20 || 30)
{
printf("True");
}
else
{
printf("False");
}
}
(A) True
(B) False
(C) Syntax Error
(D) Run time Error
Ques 7 :
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
Ques 8 :
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 9 :
What will be the output
main()
{
if(1,0)
{
printf("True");
}
else
{
printf("False");
}
}
(A) True
(B) False
(C) Compilation Error
(D) Run time Error
Ques 10 :
What is the output of following program?
void xyz(int b){
++b;
}
void main(){
int b=200;
xyz(b);
xyz(b);
printf("%d",b);
}
(A) 200
(B) 201
(C) 202
(D) 203
Ques 11 :
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
Ques 12 :
What is the output of the following program?
#include "stdio.h"
void fun(int _){
printf("%d",_);
}
main(){
fun(23);
return 0;
}
(A) 0
(B) 23
(C) garbage
(D) error
Ques 13 :
What is the output of following program?
void main(){
printf("%d%d%d",10<<1, 10>>1, ~10);
printf("%d%d%d",10^20, 10|20, 10&20);
}
(A) 20 5 -11 30 30 1
(B) 20 5 -9 30 30 0
(C) 5 20 -11 30 30 0
(D) 20 5 -11 30 30 0
Ques 14 :
What will be output when you will execute following code?
static extern int a=5;
static int b=6;
main()
{
printf("%d",a);
printf("%d",b);
return 0;
}
(A) a=0 b=6
(B) a=5 b=0
(C) a=5 b=6
(D) none of these
Ques 15 :
What is the output of following program?
void abc(int a, int b){
printf("%d%d",++a,++b);
}
void main(){
int a=10;
abc(++a,a++);
abc(a++,++a);
printf("%d",a);
}
(A) 13 12 12 13 14
(B) 13 11 14 14 14
(C) 13 11 13 14 14
(D) 13 12 14 14 14
Ques 16 :
How many variables scopes are there in "C" language?
(A) 2
(B) 3
(C) 4
(D) 5
Ques 17 :
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 18 :
what is the output of following program?
void main(){
float a;
a=6.7;
if(a==6.7)
printf("A");
else
printf("B");
}
(A) A
(B) B
(C) error
(D) nothing display on screen
Ques 19 :
what is the output of following program?
main(){
auto a;
register r;
static s;
extern e;
printf("%d",sizeof a);
printf("%d",sizeof r);
printf("%d",sizeof s);
printf("%d",sizeof e);
return 0;
}
(A) 2 4 2 4
(B) 2 2 4 2
(C) 2 2 2 2
(D) 2 4 2 2
Ques 20 :
What is the output of the following code?
#include "stdio.h"
extern int a;
main(){
printf("\n a=%d",a);
return 0;
}
int a;
(A) a=0
(B) error
(C) nothing display on screen
(D) none of these
Submit Answer
Don't Refresh the Page !! ...