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...


int i,j;

for(i=0;i<=10;i++)

{

j+=5;

assert(i<5);

}

Answers were Sorted based on User's Feedback



int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }..

Answer / susie

Answer :

Runtime error: Abnormal program termination.

assert failed (i<5), <file name>,<line number>

Explanation:

asserts are used during debugging to make sure that certain
conditions are satisfied. If assertion fails, the program
will terminate reporting the same. After debugging use,

#undef NDEBUG

and this will disable all the assertions from the
source code. Assertion

is a good debugging tool to make use of.

Is This Answer Correct ?    13 Yes 2 No

int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }..

Answer / cmonkey

j has not been initialized, so j could hold any garbage.
Depending upon what was in j, assertion could pass or fail.

Is This Answer Correct ?    3 Yes 0 No

int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }..

Answer / guest

error

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C Code Interview Questions

int i=10; main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); }

1 Answers  


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  


#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }

1 Answers  


main() { int i=10; i=!i>14; Printf ("i=%d",i); }

1 Answers  


How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?

0 Answers  


main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }

1 Answers  


struct Foo { char *pName; }; main() { struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); strcpy(obj->pName,"Your Name"); printf("%s", obj->pName); } a. Your Name b. compile error c. Name d. Runtime error

3 Answers   HCL,


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,


main() { int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }

3 Answers   GNITC,


write a c-program to find gcd using recursive functions

5 Answers   HTC, Infotech,


char *someFun() { char *temp = “string constant"; return temp; } int main() { puts(someFun()); }

1 Answers  


main() { clrscr(); } clrscr();

2 Answers  


Categories