main()
{
char i=0;
for(;i>=0;i++) ;
printf("%d\n",i);
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
Behavior is implementation dependent.
Explanation:
The detail if the char is signed/unsigned by default
is implementation dependent. If the implementation treats
the char to be signed by default the program will print –128
and terminate. On the other hand if it considers char to be
unsigned by default, it goes to infinite loop.
Rule:
You can write programs that have implementation
dependent behavior. But dont write programs that depend on
such behavior.
Is This Answer Correct ? | 5 Yes | 2 No |
write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30
main() { int i, n; char *x = “girl”; n = strlen(x); *x = x[n]; for(i=0; i<n; ++i) { printf(“%s\n”,x); x++; } }
Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped
void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }
void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(“%d”,k); }
main() { 41printf("%p",main); }8
#include<stdio.h> void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int i) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } the answer is 0 1 2 0..someone explain how the code is executed..?
All the combinations of prime numbers whose sum gives 32
main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } a. 2 b. 100 c. 4 d. none of the above
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
How can u say that a given point is in a triangle? 1. with the co-ordinates of the 3 vertices specified. 2. with only the co-ordinates of the top vertex given.
int a = 10 + 10 .... ,... A = A * A What would be the value of A? The answer is 120!! Could anyone explain this to me.
2 Answers Bosch, eInfochips, HCL, IHCL,