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; } - Study24x7
Social learning Network
03 Mar 2023 12:30 PM study24x7 study24x7

What will be the output of the program?

#include<stdio.h> #include<stdlib.h> 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; }

A

Error: RValue required

B

Error: cannot convert from 'const int *' to 'int *const'

C

Error: LValue required in strcpy

D

No error

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles