MCQs
Total Questions : 5
Answer: Option A. -> b->var;
Because in a structure pointer, the data element is declared as above only.
Answer: Option D. -> struct a_struct {int a;};
The a_struct is declared as structure name and its data element is a.
Answer: Option A. -> 252
In this program, We are dividing the values of a and b, printing it.
Output:
$ g++ stu5.cpp
$ a.out
252
Answer: Option A. -> Adidas $ 9.99 Adidas $ 1.11
We copied the value of shoe1 into shoe2 and divide the shoe2 value by 9, So this is the output.
Output:
$ g++ stu2.cpp
$ a.out
Adidas $ 9.99
Adidas $ 1.11
Answer: Option A. -> 19845
In this program, we are just converting the given hours and minutes into seconds.
Output:
$ g++ stu1.cpp
$ a.out
Total seconds:19845