
C Programming Day-12
Quiz
•
Engineering
•
University
•
Medium
Vaishnavi K AIDS
Used 1+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
How do you define a structure with a name student containing an int age?
struct student { int age; };
structure student { int age; };
struct student = { int age; };
student struct { int age; };
Answer explanation
This defines a structure named student with one member age of type int.
It groups related data (here, just age) under one name using the struct keyword.
2.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Predict the output
3 4
4 3
Compilation Error
0 0
Answer explanation
The structure is correctly initialized with x = 3 and y = 4.
3.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which keyword is used to define a structure in C?
class
struct
object
define
Answer explanation
In C, struct is the keyword used to create a user-defined data type that groups variables of different types.
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What is the symbol used to declare a pointer?
&
%
*
@
Answer explanation
The asterisk ( * )i s used to declare and dereference a pointer.
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What does the & operator do in C?
Adds two numbers
Finds modulus
Multiplies pointers
Finds address of a variable
Answer explanation
&x gives the memory address of x.
6.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What is the output of the following code?
Address of x
10
Garbage
Compilation error
Answer explanation
For example, &x gives the memory address of x.
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
How do you access the member age of a structure variable p?
p->age
p.age
age.p
p->age()
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
Cuestionario sobre Transformadores
Quiz
•
University
7 questions
Quiz 2 MPU MCU Linker and Loader
Quiz
•
University
7 questions
Water Wizard Challenge: Hydraulics and Water Treatment
Quiz
•
University
15 questions
Normowanie i harmonizacja pracy
Quiz
•
University
13 questions
Oops moment/1
Quiz
•
University
10 questions
EPO460 - Three phase system
Quiz
•
University
14 questions
Energy Management Techniques for SoC
Quiz
•
University
15 questions
Quiz Master's 2.0
Quiz
•
University
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
MINERS Core Values Quiz
Quiz
•
8th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
Discover more resources for Engineering
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
7 questions
Central Idea of Informational Text
Interactive video
•
4th Grade - University
20 questions
Physical or Chemical Change/Phases
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
39 questions
Unit 7 Key Terms
Quiz
•
11th Grade - University
7 questions
Transition Words and Phrases
Interactive video
•
4th Grade - University
18 questions
Plotting Points on the Coordinate Plane
Quiz
•
KG - University
5 questions
Declaration of Independence
Interactive video
•
4th Grade - University
