C Programming :: Const
-
What will be the output of the program?
#include
#include union employee { char name[15]; int age; float salary; }; const union employee e1; int main() { strcpy(e1.name, "K"); printf("%s %d %f", e1.name, e1.age, e1.salary); return 0; } -
What will be the output of the program?
#include
-
What will be the output of the program?
#include
int main() { const int x=5; const int *ptrx; ptrx = &x; *ptrx = 10; printf("%d\n", x); return 0; } -
What will be the output of the program in TurboC?
#include
int fun(int **ptr); int main() { int i=10, j=20; const int *ptr = &i; printf(" i = %5X", ptr); printf(" ptr = %d", *ptr); ptr = &j; printf(" j = %5X", ptr); printf(" ptr = %d", *ptr); return 0; } -
What will be the output of the program?
#include
int main() { const char *s = ""; char str[] = "Hello"; s = str; while(*s) printf("%c", *s++); return 0; } -
What will be the output of the program (in Turbo C)?
#include
int fun(int *f) { *f = 10; return 0; } int main() { const int arr[5] = {1, 2, 3, 4, 5}; printf("Before modification arr[3] = %d", arr[3]); fun(&arr[3]); printf("\nAfter modification arr[3] = %d", arr[3]); return 0; } -
What will be the output of the program?
#include
int main() { const int i=0; printf("%d\n", i++); return 0; } -
What will be the output of the program?
#include