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()

{

int x=5;

clrscr();

for(;x==0;x--) {

printf("x=%d\n”", x--);

}

}

a. 4, 3, 2, 1, 0

b. 1, 2, 3, 4, 5

c. 0, 1, 2, 3, 4

d. none of the above

Answers were Sorted based on User's Feedback



main() { int x=5; clrscr(); for(;x==0;x--) { printf("x=%d\n”", ..

Answer / guest

d) prints nothing, as condition x==0 is False

Is This Answer Correct ?    11 Yes 0 No

main() { int x=5; clrscr(); for(;x==0;x--) { printf("x=%d\n”", ..

Answer / ana

nothing

Is This Answer Correct ?    4 Yes 0 No

main() { int x=5; clrscr(); for(;x==0;x--) { printf("x=%d\n”", ..

Answer / ranjith v

d:None of the above
Explanation:
In for loop the condition x==0,i.e;x0 is assigned to
zero.which means x value will be 0 not the 5.so it causes error.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Code Interview Questions

What is data _null_? ,Explain with code when u need to use it in data step programming ?

0 Answers   Abbott,


Write a program to receive an integer and find its octal equivalent?

7 Answers  


void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(“%d”,k); }

1 Answers  


To reverse an entire text file into another text file.... get d file names in cmd line

0 Answers   Subex,


struct point { int x; int y; }; struct point origin,*pp; main() { pp=&origin; printf("origin is(%d%d)\n",(*pp).x,(*pp).y); printf("origin is (%d%d)\n",pp->x,pp->y); }

1 Answers  


# include<stdio.h> aaa() { printf("hi"); } bbb(){ printf("hello"); } ccc(){ printf("bye"); } main() { int (*ptr[3])(); ptr[0]=aaa; ptr[1]=bbb; ptr[2]=ccc; ptr[2](); }

1 Answers  


int main() { int x=10; printf("x=%d, count of earlier print=%d", x,printf("x=%d, y=%d",x,--x)); getch(); } ================================================== returns error>> ld returned 1 exit status =================================================== Does it have something to do with printf() inside another printf().

2 Answers  


why nlogn is the lower limit of any sort algorithm?

0 Answers  


main() { int i=5; printf(“%d”,i=++i ==6); }

1 Answers  


Link list in reverse order.

8 Answers   NetApp,


C statement to copy a string without using loop and library function..

2 Answers   Persistent, TCS,


main() { char *p="hai friends",*p1; p1=p; while(*p!='\0') ++*p++; printf("%s %s",p,p1); }

3 Answers  


Categories