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 c program to print magic square of order n when n>3 and n is odd?
How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)
how many processes will gate created execution of -------- fork(); fork(); fork(); -------- Please Explain... Thanks in advance..!
Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped
Which one is taking more time and why ? :/home/amaresh/Testing# cat time.c //#include <stdio.h> #define EOF -1 int main() { register int c; while ((c = getchar()) != EOF) { putchar(c); } return 0; } ------------------- WIth stdio.h:- :/home/amaresh/Testing# time ./time_header hi hi hru? hru? real 0 m4.202s user 0 m0.000s sys 0 m0.004s ------------------ Witout stdio.h and with #define EOF -1 =================== /home/amaresh/Testing# time ./time_EOF hi hi hru? hru? real 0 m4.805s user 0 m0.004s sys 0 m0.004s -- From above two case , why 2nd case is taking more time ?
write a c-program to find gcd using recursive functions
‎#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }
how can i search an element in an array
2 Answers CTS, Microsoft, ViPrak,
How to reverse a String without using C functions ?
33 Answers Matrix, TCS, Wipro,
main( ) { char *q; int j; for (j=0; j<3; j++) scanf(“%s” ,(q+j)); for (j=0; j<3; j++) printf(“%c” ,*(q+j)); for (j=0; j<3; j++) printf(“%s” ,(q+j)); }
how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns
main() { char a[4]="HELLO"; printf("%s",a); }