main()

{

int i = 100;

clrscr();

printf("%d", sizeof(sizeof(i)));

}

a. 2

b. 100

c. 4

d. none of the above

Answers were Sorted based on User's Feedback



main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } ..

Answer / guest

a) 2

Is This Answer Correct ?    14 Yes 1 No

main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } ..

Answer / rakesh

ans will depend upon the compiler being used
if it c then it's (a)

Is This Answer Correct ?    9 Yes 3 No

main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } ..

Answer / sandeep

answer :


a> 2

becase sizeof method return the size of passed
arguments's data type

Is This Answer Correct ?    5 Yes 0 No

main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } ..

Answer / karthi

a.2

Is This Answer Correct ?    2 Yes 0 No

main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } ..

Answer / kurt s

sizeof() is a compile-time operator, and it's implementation-specific. Depending on compiler and operating system, it is likely to be either (a) or (c). My desktop machine (Fedora core 13 , 32-bit) returns 4, but my old laptop running Win2000 returns 2.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Code Interview Questions

main() { char name[10],s[12]; scanf(" \"%[^\"]\"",s); } How scanf will execute?

2 Answers  


Write a c program to search an element in an array using recursion

1 Answers   Wipro,


print numbers till we want without using loops or condition statements like specifically(for,do while, while swiches, if etc)!

11 Answers   Wipro,


Write a prog to accept a given string in any order and flash error if any of the character is different. For example : If abc is the input then abc, bca, cba, cab bac are acceptable, but aac or bcd are unacceptable.

5 Answers   Amazon, Microsoft,


programming in c lanugaue programm will errror error with two header file one as stdio.h and other one is conio.h

1 Answers  






main() { char not; not=!2; printf("%d",not); }

1 Answers  


Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..

2 Answers  


Write a C program to print look and say sequence? For example if u get the input as 1 then the sequence is 11 21 1211 111221 312211 12112221 .......(it counts the no. of 1s,2s etc which is in successive order) and this sequence is used in run-length encoding.

1 Answers  


There were 10 records stored in “somefile.dat” but the following program printed 11 names. What went wrong? void main() { struct student { char name[30], rollno[6]; }stud; FILE *fp = fopen(“somefile.dat”,”r”); while(!feof(fp)) { fread(&stud, sizeof(stud), 1 , fp); puts(stud.name); } }

1 Answers  


main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }

1 Answers  


#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }

1 Answers  


#include<stdio.h> int main() { int a=3,post,pre; post= a++ * a++ * a++; a=3; pre= ++a * ++a * ++a; printf("post=%d pre=%d",post,pre); return 0; }

3 Answers  


Categories