22.
What is the correct syntax to define a union in C++?

25.
What is a dangling pointer in C++?

27.
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
struct sec 
{
    int a;
    char b;
};
int main()
{
    struct sec s ={25,50};
    struct sec *ps =(struct sec *)&s;
    cout << ps->a << ps->b;
    return 0;
}

28.
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
struct Time 
{
    int hours;
    int minutes;
    int seconds;
};
int toSeconds(Time now);
int main()
{
    Time t;
    t.hours = 5;
    t.minutes = 30;
    t.seconds = 45;
    cout << "Total seconds: " << toSeconds(t) << endl;
    return 0;
}
int toSeconds(Time now)
{
    return 3600 * now.hours + 60 * now.minutes + now.seconds;
}

29.
What will be the output of the following C++ code?
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
    struct student 
    {
        int num;
        char name[25];
    };
    student stu;
    stu.num = 123;
    strcpy(stu.name, "John");
    cout << stu.num << endl;
    cout << stu.name << endl;
    return 0;
}