What is the hidden bug with the following statement?
assert(val++ != 0);
Answer / susie
Answer : & Explanation:
Assert macro is used for debugging and removed in release
version. In assert, the experssion involves side-effects. So
the behavior of the code becomes different in case of debug
version and the release version thus leading to a subtle bug.
Rule to Remember:
Don’t use expressions that have side-effects in assert
statements.
Is This Answer Correct ? | 2 Yes | 0 No |
main() { int a[10]; printf("%d",*a+1-*a+3); }
void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }
How we will connect multiple client ? (without using fork,thread)
write a program to find out roots of quadratic equation "x=-b+-(b^2-4ac0^-1/2/2a"
main() { int i=0; for(;i++;printf("%d",i)) ; printf("%d",i); }
Design an implement of the inputs functions for event mode
How to reverse a String without using C functions ?
33 Answers Matrix, TCS, Wipro,
# include<stdio.h> aaa() { printf("hi"); } bbb(){ printf("hello"); } ccc(){ printf("bye"); } main() { int (*ptr[3])(); ptr[0]=aaa; ptr[1]=bbb; ptr[2]=ccc; ptr[2](); }
How do I write a program to print proper subset of given string . Eg :input: abc output:{},{a},{b},{c},{a,b},{a,c},{b,c}, {a,b,c}.I desperately need this program please mail me to saravana6m@gmail.com
what is the code of the output of print the 10 fibonacci number series
main() { int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
how can i cast a char type array to an int type array