void main()
{
if(~0 == (unsigned int)-1)
printf(“You can answer this if you know how values are
represented in memory”);
}
Answer / susie
Answer :
You can answer this if you know how values are
represented in memory
Explanation
~ (tilde operator or bit-wise negation operator) operates on
0 to produce all ones to fill the space for an integer. –1
is represented in unsigned value as all 1’s and so both are
equal.
| Is This Answer Correct ? | 3 Yes | 0 No |
write a program to count the number the same (letter/character foreg: 's') in a given sentence.
func(a,b) int a,b; { return( a= (a==b) ); } main() { int process(),func(); printf("The value of process is %d !\n ",process(func,3,6)); } process(pf,val1,val2) int (*pf) (); int val1,val2; { return((*pf) (val1,val2)); }
main() { char *str1="abcd"; char str2[]="abcd"; printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd")); }
main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }
main() { int y; scanf("%d",&y); // input given is 2000 if( (y%4==0 && y%100 != 0) || y%100 == 0 ) printf("%d is a leap year"); else printf("%d is not a leap year"); }
main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } a. 2 b. 100 c. 4 d. none of the above
main() { char p[ ]="%d\n"; p[1] = 'c'; printf(p,65); }
main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
What are segment and offset addresses?
write a c-program to find gcd using recursive functions
How to use power function under linux environment.eg : for(i=1;i<=n;i++){ pow(-1,i-1)} since it alerts undefined reference to 'pow'.
How to access command-line arguments?