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                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
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(){

       unsigned int i;

       for(i=1;i>-2;i--)

        		printf("c aptitude");

      }
 Question Submitted By :: Susie
I also faced this Question!!     Rank Answer Posted By  
 
  Re: main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }
Answer
# 1
Explanation:

i is an unsigned integer. It is compared with a signed
value. Since the both types doesn't match, signed is
promoted to unsigned value. The unsigned equivalent of -2 is
a huge value so condition becomes false and control comes
out of the loop.
 
Is This Answer Correct ?    0 Yes 0 No
Susie
 

 
 
 
Other C Code Interview Questions
 
  Question Asked @ Answers
 
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); }  1
main() { struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }  1
main() { int i=10; i=!i>14; Printf ("i=%d",i); }  1
main() { extern int i; i=20; printf("%d",i); }  1
What is the hidden bug with the following statement? assert(val++ != 0);  1
why java is platform independent? Wipro10
main() { char *p="hai friends",*p1; p1=p; while(*p!='\0') ++*p++; printf("%s %s",p,p1); }  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
how can u draw a rectangle in C Wipro31
#define clrscr() 100 main() { clrscr(); printf("%d\n",clrscr()); }  1
write a program to Insert in a sorted list Microsoft4
main() { char *p = “ayqm”; char c; c = ++*p++; printf(“%c”,c); }  1
how to check whether a linked list is circular.  3
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }  1
void main() { int i=5; printf("%d",i+++++i); }  1
main() { int i=4,j=7; j = j || i++ && printf("YOU CAN"); printf("%d %d", i, j); }  1
plz send me all data structure related programs  1
main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }  1
#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }  1
Program to find the largest sum of contiguous integers in the array. O(n)  7
 
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