main()
{
int i=-1;
-i;
printf("i = %d, -i = %d \n",i,-i);
}
Answer / susie
Answer :
i = -1, -i = 1
Explanation:
-i is executed and this execution doesn't affect the value
of i. In printf first you just print the value of i. After
that the value of the expression -i = -(-1) is printed.
| Is This Answer Correct ? | 6 Yes | 1 No |
main() { float i=1.5; switch(i) { case 1: printf("1"); case 2: printf("2"); default : printf("0"); } }
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
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
plz send me all data structure related programs
What is wrong with the following code? int *foo() { int *s = malloc(sizeof(int)100); assert(s != NULL); return s; }
void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }
main(int argc, char *argv[]) { (main && argc) ? main(argc-1, NULL) : return 0; } a. Runtime error. b. Compile error. Illegal syntax c. Gets into Infinite loop d. None of the above
Write a C program to print ‘Campus Force training’ without using even a single semicolon in the program.
main() { struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }
how to test pierrot divisor
#if something == 0 int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }
Display the time of the system and display the right time of the other country