main()
{
int i;
float *pf;
pf = (float *)&i;
*pf = 100.00;
printf("\n %d", i);
}
a. Runtime error.
b. 100
c. Some Integer not 100
d. None of the above
Answers were Sorted based on User's Feedback
d) Some junk number because floating value is stored in
integer via pointer pf.
Is This Answer Correct ? | 15 Yes | 1 No |
main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }
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() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123
Derive expression for converting RGB color parameters to HSV values
String copy logic in one line.
How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)
Program to Delete an element from a doubly linked list.
4 Answers College School Exams Tests, Infosys,
void main() { if(~0 == (unsigned int)-1) printf(“You can answer this if you know how values are represented in memory”); }
Link list in reverse order.
main() { int c=- -2; printf("c=%d",c); }
#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }