Call
whatsapp
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
Cisco Training in Trivandrum, Trinity Technologies

No.1 Training Institute in Kerala

C PROGRAM QUESTIONS : PART 32

What will be output if you will compile and execute the following c code?
void main(){
int a,b;
a=1,3,15;
b=(2,4,6);
clrscr();
printf("%d ",a+b);
getch();
}

3
21
 17
 7
 Compiler error
SHOW ANSWER

What will be output if you will compile and execute the following c code?
void main(){
static main;
int x;
x=call(main);
clrscr();
printf("%d ",x);
getch();
}
int call(int address){
address++;
return address;
}

0
 1
Garbage value
 Compiler error
None of these
SHOW ANSWER

What will be output if you will compile and execute the following c code?
#include "string.h"
void main(){
clrscr();
printf("%d %d",sizeof("string"),strlen("string"));
getch();
}

6 6
7 7
 6 7
 7 6
None of these
SHOW ANSWER

What will be output if you will compile and execute the following c code?
void main(){
int huge*p=(int huge*)0XC0563331;
int huge*q=(int huge*)0xC2551341;
*p=200;
printf("%d",*q);
}

0
Garbage value
null
 200
Compiler error
SHOW ANSWER

What will be output if you will compile and execute the following c code?
struct marks{
int p:3;
int c:3;
int m:2;
};
void main(){
struct marks s={2,-6,5};
printf("%d %d %d",s.p,s.c,s.m);
}

2 -6 5
2 -6 1
2 2 1
Compiler error
None of these
SHOW ANSWER

What will be output if you will compile and execute the following c code?
void main(){
if(printf("cquestionbank"))
printf("I know c");
else
printf("I know c++");
}

I know c
 I know c++
 cquestionbankI know c
 cquestionbankI know c++
Compiler error
SHOW ANSWER

What will be output if you will compile and execute the following c code?
#define call(x) #x
void main(){
printf("%s",call(c/c++));
}

c
c++
#c/c++
c/c++
Compiler error
SHOW ANSWER

What will be output if you will compile and execute the following c code?
#define message "union is\
power of c"
void main(){
clrscr();
printf("%s",message);
getch();
}

union is power of c
 union ispower of c
union is
Power of c
Compiler error
 None of these
SHOW ANSWER

What will be output if you will compile and execute the following c code?
void main(){
int a=25;
clrscr();
printf("%o %x",a,a);
getch();
}

25 25
 025 0x25
 12 42
31 19
None of these
SHOW ANSWER

What will be output if you will compile and execute the following c code?
void main(){
int i=0;
if(i==0){
i=((5,(i=3)),i=1);
printf("%d",i);
}
else
printf("equal");
}

5
3
 1
 equal
None of above
SHOW ANSWER

What will be output if you will compile and execute the following c code?
int extern x;
void main()
printf("%d",x);
x=2;
getch();
}
int x=23;

0
 2
23
Compiler error
None of these
SHOW ANSWER

What will be output if you will compile and execute the following c code?
void main(){
int a,b;
a=1,3,15;
b=(2,4,6);
clrscr();
printf("%d ",a+b);
getch();
}

3
21
17
7
Compiler error
SHOW ANSWER

What will be output if you will compile and execute the following c code?
void main(){
static main;
int x;
x=call(main);
clrscr();
printf("%d ",x);
getch();
}
int call(int address){
address++;
return address;
}

0
1
 Garbage value
 Compiler error
None of these
SHOW ANSWER
BACK | NEXT
TRINITY SOFTWARE SOLUTIONS,IInd floor, Radheyam Towers, Gandhari Amman Kovil Road, Pulimood, Trivandrum - 1
0471-2334855 | 2335855 | 9447387064 | 9847003556 info@trinitytechnology.in