Question:How to find size of union data type without using sizeof operator in c programming language 

Answer 
#include<stdio.h>
union student{
    int roll;
    char name[100];
    float marks;
};

int main(){
  union student *ptr = 0;
  ptr++;
  printf("Size of the union student:  %d",ptr);
  return 0;
}
 

+ Report
Total Preview: 757
How to find size of union data type without using sizeof operator in c programming language
Copyright © 2024. Powered by Intellect Software Ltd