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() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); }
could you please send the program code for multiplying sparse matrix in c????
void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(“%d”,k); }
main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }
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); }
#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); }
void main() { char ch; for(ch=0;ch<=127;ch++) printf(“%c %d \n“, ch, ch); }
What is "far" and "near" pointers in "c"...?
Develop a routine to reflect an object about an arbitrarily selected plane
#include <stdio.h> main() { char * str = "hello"; char * ptr = str; char least = 127; while (*ptr++) least = (*ptr<least ) ?*ptr :least; printf("%d",least); }
int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr)); }