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 |
typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }
how can u draw a rectangle in C
53 Answers Accenture, CO, Codeblocks, Cognizant, HCL, Oracle, Punjab National Bank, SAP Labs, TCS, University, Wipro,
Write a program to receive an integer and find its octal equivalent?
const int perplexed = 2; #define perplexed 3 main() { #ifdef perplexed #undef perplexed #define perplexed 4 #endif printf("%d",perplexed); } a. 0 b. 2 c. 4 d. none of the above
How will u find whether a linked list has a loop or not?
what is oop?
int aaa() {printf(“Hi”);} int bbb(){printf(“hello”);} iny ccc(){printf(“bye”);} main() { int ( * ptr[3]) (); ptr[0] = aaa; ptr[1] = bbb; ptr[2] =ccc; ptr[2](); }
Printf can be implemented by using __________ list.
how many processes will gate created execution of -------- fork(); fork(); fork(); -------- Please Explain... Thanks in advance..!
How to return multiple values from a function?
main() { char not; not=!2; printf("%d",not); }
main() { char name[10],s[12]; scanf(" \"%[^\"]\"",s); } How scanf will execute?