
C Programming Quiz

Quiz
•
Computers
•
University
•
Hard
Dr. Gera
Used 1+ times
FREE Resource
36 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default return type of a function in C if no return type is specified?
void
int
float
char
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to explicitly return a value from a function?
return
break
exit
stop
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the scope of a variable declared inside a function in C?
Global
Block
Local
Static
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax for defining a function in C?
return_type function_name(parameters) { function_body }
function_name(parameters) return_type { function_body }
function_name { function_body } return_type
return_type { function_body } function_name(parameters)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if a function is called but not defined in C?
Compilation error
Runtime error
Undefined behavior
No error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid function prototype in C?
int sum(int, int);
sum(int, int);
int sum;
sum(int a, int b)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements about global variables is true?
They can only be accessed in the function where they are declared
They retain their value throughout the program execution
They must be declared inside a function
They cannot be modified once initialized
Create a free account and access millions of resources
Similar Resources on Wayground
40 questions
10th Grade 10 - IT Programming - 2nd Cycle Exam

Quiz
•
10th Grade - University
40 questions
Ulangan Harian Sem 1

Quiz
•
11th Grade - University
40 questions
C++ Basics

Quiz
•
University
40 questions
IOT_SARS

Quiz
•
University
35 questions
Web Lanjut 2025

Quiz
•
University
40 questions
Basics of C Programming - 1

Quiz
•
University
35 questions
QUIZ PEMROGRAMAN 1 REG. PAGI

Quiz
•
University
34 questions
C++ Functions and Arrays Quiz

Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
11 questions
NFL Football logos

Quiz
•
KG - Professional Dev...
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
38 questions
Unit 6 Key Terms

Quiz
•
11th Grade - University
20 questions
La Hora

Quiz
•
9th Grade - University
7 questions
Cell Transport

Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?

Interactive video
•
4th Grade - University