main()

{

{

unsigned int bit=256;

printf("%d", bit);

}

{

unsigned int bit=512;

printf("%d", bit);

}

}

a. 256, 256

b. 512, 512

c. 256, 512

d. Compile error



main() { { unsigned int bit=256; printf("%d", bit); } ..

Answer / guest

256, 512, becoz these r different blocks, so declaration
allowed

Is This Answer Correct ?    21 Yes 0 No

Post New Answer

More C Code Interview Questions

How can i find first 5 natural Numbers without using any loop in c language????????

2 Answers   Microsoft,


Find your day from your DOB?

15 Answers   Accenture, Microsoft,


void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(“%d”,k); }

1 Answers  


#define square(x) x*x main() { int i; i = 64/square(4); printf("%d",i); }

4 Answers   Google, HCL, Quick Heal, WTF,


main(){ char a[100]; a[0]='a';a[1]]='b';a[2]='c';a[4]='d'; abc(a); } abc(char a[]){ a++; printf("%c",*a); a++; printf("%c",*a); }

2 Answers  


main() { int i=5,j=6,z; printf("%d",i+++j); }

2 Answers  


#include<stdio.h> main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } }

1 Answers  


what is the code of the output of print the 10 fibonacci number series

2 Answers  


int main() { int x=10; printf("x=%d, count of earlier print=%d", x,printf("x=%d, y=%d",x,--x)); getch(); } ================================================== returns error>> ld returned 1 exit status =================================================== Does it have something to do with printf() inside another printf().

1 Answers  


#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }

2 Answers  


How to swap two variables, without using third variable ?

104 Answers   AB, ADP, BirlaSoft, Cisco, Cygnet Infotech, HCL, Hewitt, Honeywell, HP, IBM, Infosys, Manhattan, Microsoft, Mobius, Percept, Satyam, SofTMware, TCS, Wipro, Yamaha,


void main() { int const * p=5; printf("%d",++(*p)); }

3 Answers   Infosys, Made Easy, State Bank Of India SBI,


Categories