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

Write a C function to search a number in the given list of numbers. donot use printf and scanf

5 Answers   Honeywell, TCS,


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

1 Answers  


typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }

1 Answers  


which function is used to clear the buffer stream on gcc? for example: I wrote following code on gcc #include<stdio.h> int main(void) { char ch; int a,b; printf("\nenter two numbers:\t"); scanf("%d%d",&a,&b); printf("enter number is %d and %d",a,b); printf("\nentercharacter:\t"); scanf("%c",&ch); printf("enter character is %c",ch); return 0; } in above progarm ch could not be scan. why?plz tell me solution.

2 Answers  


What is the main difference between STRUCTURE and UNION?

13 Answers   HCL,






write a c-program to display the time using FOR loop

3 Answers   HCL,


main() { extern int i; i=20; printf("%d",sizeof(i)); }

2 Answers  


Develop a routine to reflect an object about an arbitrarily selected plane

0 Answers  


#include"math.h" void main() { printf("Hi everybody"); } if <stdio.h> will be included then this program will must compile, but as we know that when we include a header file in "" then any system defined function find its defination from all the directrives. So is this code of segment will compile? If no then why?

2 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  


void main() { static int i=5; if(--i){ main(); printf("%d ",i); } }

1 Answers  


What is "far" and "near" pointers in "c"...?

3 Answers  


Categories