
C Programming Quiz
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Dr. Gera
Used 1+ times
FREE Resource
Enhance your content in a minute
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
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
35 questions
情報1_第三学期_総復習
Quiz
•
9th Grade - University
35 questions
term 2 practice grade 7
Quiz
•
7th Grade - University
35 questions
Quiz PTS CT & Algoritma Pemrograman
Quiz
•
10th Grade - University
35 questions
Kuis Aplikasi Kamus Digital
Quiz
•
8th Grade - University
36 questions
MOC 20345 Test
Quiz
•
University
31 questions
Fundamentos de Excel y Bases de Datos
Quiz
•
University
40 questions
QUIZZ KJD - PERAWATAN, PERMASALAHAN DAN PERBAIKAN PC
Quiz
•
KG - Professional Dev...
40 questions
EDUCATION 105 - SECOND EXAM
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
