C Programming Tutorial - 71: Unions

preview_player
Показать описание
In this tutorial we will understand how we can use the union data type in our C Programs, we'll also check out the major difference between structures and unions.
Рекомендации по теме
Комментарии
Автор

How it works? There is no ; after the end-} from the ??

Автор

Can we pass Union in terms of array as an argument in a function?

bipros
Автор

pls tell me how to record the video with voice ....(
software name)

manoharagn
Автор

The code is in here:
#include<stdio.h>
#include<string.h>
union university
{
   int s_age;
    char s_name[30];

}

    main()
    {
        union university student;
        student.s_age = 22;
        printf("Student Age: %d\n", student.s_age);
        strcpy(student.s_name, "Gudukasa");
         printf("Student Name: %s\n", student.s_name);

    }

gudukasa
Автор

you are supposed to write code, , to make a tutorial not read a code, , take this shit down