int i,j;
for(i=0;i<=10;i++)
{
j+=5;
assert(i<5);
}
Answers were Sorted based on User's Feedback
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 |
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 |
main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
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"
main() { float f=5,g=10; enum{i=10,j=20,k=50}; printf("%d\n",++k); printf("%f\n",f<<2); printf("%lf\n",f%g); printf("%lf\n",fmod(f,g)); }
main() { main(); }
How to count a sum, when the numbers are read from stdin and stored into a structure?
Sorting entire link list using selection sort and insertion sort and calculating their time complexity
1 Answers Infosys, Microsoft, NetApp,
main() { show(); } void show() { printf("I'm the greatest"); }
What is the output of the program given below main() { signed char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
Write a Program in 'C' To Insert a Unique Number Only. (Hint: Just Like a Primary Key Numbers In Database.) Please Some One Suggest Me a Better Solution for This question ??
struct aaa{ struct aaa *prev; int i; struct aaa *next; }; main() { struct aaa abc,def,ghi,jkl; int x=100; abc.i=0;abc.prev=&jkl; abc.next=&def; def.i=1;def.prev=&abc;def.next=&ghi; ghi.i=2;ghi.prev=&def; ghi.next=&jkl; jkl.i=3;jkl.prev=&ghi;jkl.next=&abc; x=abc.next->next->prev->next->i; printf("%d",x); }
Printf can be implemented by using __________ list.
Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..