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

write a program to count the number the same (letter/character foreg: 's') in a given sentence.

2 Answers  


Ramesh’s basic salary is input through the keyboard. His dearness allowance is 40% of basic salary, and house rent allowance is 20% of basic salary. Write a program to calculate his gross salary.

1 Answers  


int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr)); }

2 Answers   CSC,


#include<stdio.h> main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); }

1 Answers  


main() { char c; int i = 456; clrscr(); c = i; printf("%d", c); } a. 456 b. -456 c. random number d. none of the above

3 Answers   BrickRed, HCL,






why java is platform independent?

13 Answers   Wipro,


void main() { static int i; while(i<=10) (i>2)?i++:i--; printf(“%d”, i); }

2 Answers  


Write a program that reads a dynamic array of 40 integers and displays only even integers

2 Answers  


void main() { static int i=i++, j=j++, k=k++; printf(“i = %d j = %d k = %d”, i, j, k); }

3 Answers  


Write a routine that prints out a 2-D array in spiral order

3 Answers   Microsoft,


Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.

9 Answers   Microsoft,


Find your day from your DOB?

15 Answers   Accenture, Microsoft,


Categories