ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Code Snippets  >>  Programming Code  >>  C Code
 
 


 

 
 C Code interview questions  C Code Interview Questions
 C++ Code interview questions  C++ Code Interview Questions
 VC++ Code interview questions  VC++ Code Interview Questions
 Java Code interview questions  Java Code Interview Questions
 Dot Net Code interview questions  Dot Net Code Interview Questions
 Visual Basic Code interview questions  Visual Basic Code Interview Questions
 Programming Code AllOther interview questions  Programming Code AllOther Interview Questions
Question
main()

{

  int i = 100;

  clrscr();

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

}

a. 2

b. 100

c. 4

d. none of the above
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } a. 2 b. 100 c. 4 d. none of the above
Answer
# 1
a) 2
 
Is This Answer Correct ?    0 Yes 0 No
Guest
 
  Re: main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } a. 2 b. 100 c. 4 d. none of the above
Answer
# 2
ans will depend upon the compiler being used
if it c then it's (a)
 
Is This Answer Correct ?    0 Yes 0 No
Rakesh
 
 
 

 
 
 
Other C Code Interview Questions
 
  Question Asked @ Answers
 
void main() { int *mptr, *cptr; mptr = (int*)malloc(sizeof(int)); printf(“%d”,*mptr); int *cptr = (int*)calloc(sizeof(int),1); printf(“%d”,*cptr); }  1
What is the subtle error in the following code segment? void fun(int n, int arr[]) { int *p=0; int i=0; while(i++<n) p = &arr[i]; *p = 0; }  1
How can u say that a given point is in a triangle? 1. with the co-ordinates of the 3 vertices specified. 2. with only the co-ordinates of the top vertex given.  1
int i; main(){ int t; for ( t=4;scanf("%d",&i)-t;printf("%d\n",i)) printf("%d--",t--); } // If the inputs are 0,1,2,3 find the o/p  1
main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }  1
Is the following code legal? struct a { int x; struct a *b; }  1
write the function. if all the character in string B appear in string A, return true, otherwise return false. Google10
void main() { int i=5; printf("%d",i++ + ++i); }  1
#include<stdio.h> main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); }  1
main( ) { static int a[ ] = {0,1,2,3,4}; int *p[ ] = {a,a+1,a+2,a+3,a+4}; int **ptr = p; ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *++ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); ++*ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); }  1
main() { int i=1; while (i<=5) { printf("%d",i); if (i>2) goto here; i++; } } fun() { here: printf("PP"); }  1
Is there any difference between the two declarations, 1. int foo(int *arr[]) and 2. int foo(int *arr[2])  1
Write out a function that prints out all the permutations of a string. For example, abc would give you abc, acb, bac, bca, cab, cba. You can assume that all the characters will be unique. Microsoft4
main() { int i=10; void pascal f(int,int,int); f(i++,i++,i++); printf(" %d",i); } void pascal f(integer :i,integer:j,integer :k) { write(i,j,k); }  1
main() { unsigned int i=65000; while(i++!=0); printf("%d",i); }  1
main() { char *p = "hello world"; p[0] = 'H'; printf("%s", p); } a. Runtime error. b. “Hello world” c. Compile error d. “hello world” HCL1
main() { printf("\nab"); printf("\bsi"); printf("\rha"); }  1
main() { register int a=2; printf("Address of a = %d",&a); printf("Value of a = %d",a); }  1
void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %d\n",++i); }  1
#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }  1
 
For more C Code Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com