Time Left - 15:00 mins
User Defined Datatypes II Starter Quiz
Attempt now to get your rank among 197 students!
Question 1
Which of the following is true regarding structure in C language ?
Question 2
Enum is a user defined data-type which consists of various elements. By default, what will be the value of the first element?
Question 3
A ______ is a collection of logically related data items of similar or different data types.
Question 4
The enum keyword is used to assign names to the _____ constants.
Question 5
#include<stdio.h>
enum day {sunday = 1, monday, tuesday = 5,
wednesday, thursday = 10, friday, saturday};
int main()
{
printf("%d %d %d %d %d %d %d", sunday, monday, tuesday,
wednesday, thursday, friday, saturday);
return 0;
}
What will be the output of the above code segment?
enum day {sunday = 1, monday, tuesday = 5,
wednesday, thursday = 10, friday, saturday};
int main()
{
printf("%d %d %d %d %d %d %d", sunday, monday, tuesday,
wednesday, thursday, friday, saturday);
return 0;
}
What will be the output of the above code segment?
Question 6
What is the output of the C program segment?
#include<stdio.h>
#include<stdio.h>
int main()
{
struct ship
{
int size;
char color[10];
} boat1, boat2;
boat1.size=10;
boat2 = boat1;
printf("boat2=%d",boat2.size);
return 0;
}
Question 7
Choose the correct statements among the following?
- 197 attempts
- 4 upvotes
- 0 comments
Tags :
GATE & PSU CSGeneralAug 6GATE & PSU CS