Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


main()

{

unsigned char i=0;

for(;i>=0;i++) ;

printf("%d\n",i);

}



main() { unsigned char i=0; for(;i>=0;i++) ; ..

Answer / susie

Answer :

infinite loop

Explanation

The difference between the previous question and this
one is that the char is declared to be unsigned. So the i++
can never yield negative value and i>=0 never becomes false
so that it can come out of the for loop.

Is This Answer Correct ?    7 Yes 0 No

Post New Answer

More C Code Interview Questions

respected sir, i did my MCA in 2013 when i am going to attend to an interview i was asked about my project how will i explain my project could please help me in this and my project title is "Social Networking Site For Social Responsibility"

1 Answers   Genpact, Ozdocs,


how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns

0 Answers  


#include<conio.h> main() { int x,y=2,z,a; if(x=y%2) z=2; a=2; printf("%d %d ",z,x); }

1 Answers  


Is the following code legal? typedef struct a aType; struct a { int x; aType *b; };

1 Answers  


void main() { int c; c=printf("Hello world"); printf("\n%d",c); }

2 Answers  


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 Answers  


Find your day from your DOB?

15 Answers   Accenture, Microsoft,


main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }

2 Answers  


why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?

0 Answers  


main() { char a[4]="HELLO"; printf("%s",a); }

3 Answers   CSC,


Write a program to check whether the number is prime and also check if it there i n fibonacci series, then return true otherwise return false

1 Answers   Cognizant, lenovo,


main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcpy(a,b)); } a. “Hello” b. “Hello World” c. “HelloWorld” d. None of the above

4 Answers   Corporate Society, HCL,


Categories