
C Programming Structures Quiz
Authored by SYAM SANKAR
Other
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What keyword is used to define a structure in C?
typedef
define
class
struct
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is a valid way to create a struct variable?
struct person1: Person;
create struct Person person1;
struct Person = person1;
struct Person person1;
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What operator is used to access members of a structure?
*
&
->
.
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does the typedef keyword do in C?
Creates an alias for a data type
Allocates memory
Defines a new data type
Declares a variable
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
In the struct definition, what does the following line represent: 'char name[50];'?
An integer variable
A floating-point variable
An array of characters
A pointer to a string
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How do you assign a value to a string in a struct?
Using = operator
Using sprintf() function
Using strcat() function
Using strcpy() function
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code snippet: 'printf("Name: %s\n", person1.name);'?
Name: person1.name
Name: %s
Name: Undefined
Name: George Orwell
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
21 questions
PANI1 Quiz 01
Quiz
•
University
15 questions
cookies
Quiz
•
University
15 questions
Labor Relations and Negotations 1
Quiz
•
University - Professi...
20 questions
Sals of Goods Act 1930
Quiz
•
University
19 questions
Interprocess communication
Quiz
•
University
19 questions
Les endroits dans la ville
Quiz
•
7th Grade - University
15 questions
UTAR Industrial Session
Quiz
•
University - Professi...
20 questions
Expresión Gráfica
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Other
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University