+ 2
What is the output and how?
#include <stdio.h> union Values{ int first; int second; char third[1]; }; int main() { union Values v; v.first=0; v.third[0]='b'; printf("%d",v.second); return 0; }
2 Respostas
+ 4
A union is a special data type available in C that allows to store different data types in the same memory location. You can define a union with many members, but only one member can contain a value at any given time
-> store b
-> ascii of b is 98
-> so i think o/p is 98...
+ 1
Thanks bro 👍