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

main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); }

7 Answers  


could you please send the program code for multiplying sparse matrix in c????

0 Answers  


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

1 Answers  


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

1 Answers  


write a c program to Create a registration form application by taking the details like username, address, phone number, email along with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 5 users and display the details. In place of password display “****”. (Use Structures).

0 Answers   CDAC, College School Exams Tests,


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

1 Answers  


#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }

2 Answers   CNSI,


void main() { char ch; for(ch=0;ch<=127;ch++) printf(“%c %d \n“, ch, ch); }

1 Answers  


What is "far" and "near" pointers in "c"...?

3 Answers  


Develop a routine to reflect an object about an arbitrarily selected plane

0 Answers  


#include <stdio.h> main() { char * str = "hello"; char * ptr = str; char least = 127; while (*ptr++) least = (*ptr<least ) ?*ptr :least; printf("%d",least); }

1 Answers  


int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr)); }

2 Answers   CSC,


Categories