
C Programming Day-12

Quiz
•
Engineering
•
University
•
Medium
Vaishnavi K AIDS
Used 1+ times
FREE Resource
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
Similar Resources on Wayground
10 questions
Internal Lab Quiz-1 CSECS

Quiz
•
University
10 questions
OOP_1

Quiz
•
University
10 questions
Engineering Technician vs Engineer

Quiz
•
10th Grade - University
10 questions
Computer Science Workshop Quiz

Quiz
•
University
14 questions
Quiz Análise Estrutural II

Quiz
•
University
10 questions
Recap of Sessions 14 & 15

Quiz
•
11th Grade - University
10 questions
APP R1

Quiz
•
University
5 questions
C++ Functions Quiz

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Engineering
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University