
C Programming Concepts Assessment
Quiz
•
Engineering
•
University
•
Practice Problem
•
Medium
vinjamuri Kamesh
Used 1+ times
FREE Resource
Enhance your content in a minute
35 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the basic data types available in C?
boolean
string
int, float, double, char, void
array
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the difference between 'if' and 'switch' control structures in C.
'if' is used for loops, while 'switch' is for single conditions.
The 'if' structure is for conditional checks, while 'switch' is for selecting among multiple cases based on a single expression.
'if' can only evaluate boolean expressions, while 'switch' can evaluate any data type.
'if' is faster than 'switch' in all cases.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a function in C and how is it defined?
A function in C is simply a block of code that does not require any parameters.
In C, a function is declared with the syntax: function_name(parameter_type) return_type { // body }
A function in C is defined as function_name(parameter_type parameter_name) { // function body }
A function in C is defined using the syntax: return_type function_name(parameter_type parameter_name) { // function body }
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Describe recursion and provide an example of a recursive function in C.
int factorial(int n) { if (n <= 1) return 1; return n * factorial(n - 1); }
int power(int base, int exp) { return base * power(base, exp - 1); }
int sum(int n) { return n + sum(n - 1); }
int fibonacci(int n) { return fibonacci(n - 1) + fibonacci(n - 2); }
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a pointer in C and how is it used?
A pointer in C is a variable that holds the address of another variable, enabling direct memory access and manipulation.
A pointer in C is a variable that stores a string value.
A pointer in C is a type of function that executes code.
A pointer in C is a special data type that can only hold integer values.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the concept of dynamic memory allocation in C.
Dynamic memory allocation in C is the process of allocating memory during program execution using functions like malloc and free.
Memory allocation in C is only possible using global variables.
Dynamic memory allocation in C is done at compile time using static arrays.
Dynamic memory allocation in C is managed automatically by the compiler.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the different file modes available in C for file I/O operations?
a+
The different file modes available in C for file I/O operations are: 'r', 'w', 'a', 'rb', 'wb', 'ab', 'r+', 'w+', 'a+'.
r+
w+
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
40 questions
13.1.1 - What is Civil Engineering
Quiz
•
10th Grade - University
30 questions
AI502_ML_TA_1_AIDS
Quiz
•
University
35 questions
OVERVIEW AND BASIS OF WIRELESS CHANNELS AND COMMUNICATION
Quiz
•
University
40 questions
Quiz T3kn1k R4dar-B
Quiz
•
University
30 questions
MCQs on Manholes
Quiz
•
University
31 questions
Techno trivia
Quiz
•
University
38 questions
Soil Formation
Quiz
•
University
30 questions
Electro 3 Quiz
Quiz
•
University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th 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
9 questions
Principles of the United States Constitution
Interactive video
•
University
18 questions
Realidades 2 2A reflexivos
Quiz
•
7th Grade - University
10 questions
Dichotomous Key
Quiz
•
KG - University
25 questions
Integer Operations
Quiz
•
KG - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University
20 questions
SER vs ESTAR
Quiz
•
7th Grade - University
