
C Programming Quiz
Quiz
•
Professional Development
•
12th Grade
•
Practice Problem
•
Hard
Shaik Imam
Used 22+ times
FREE Resource
Enhance your content in a minute
32 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
}Which of the following is a correct way to concatenate two strings in C using macros?
#define CONCAT(a, b) a + b
#define CONCAT(a, b) a , b
#define CONCAT(a, b) a ## b
#define CONCAT(a, b) a || b
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What function is used to allocate memory dynamically in C?
malloc()
calloc()
realloc()
All of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In dynamic memory allocation, what does the sizeof() operator determine?
Size of the allocated block
Size of the data type
Size of the pointer
Size of the structure
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you close a file in C after performing file operations?
fclose(file)
close(file)
closeFile(file)
file.close()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In C, the main function can take command line arguments. What is the prototype of such a main function?
int main(int argc , char *argv)
void main(int argc, char *argv[])
void main(char* args[])
int main(char* arguments)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access the second command line argument in C?
argv[1]
argv[2]
argc[1]
args[2]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the memset() function do in C?
Copies memory block
Moves memory block
Sets memory block with a constant value
Allocates memory block
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
30 questions
Security + (SY0-601) Domain 3--Architecture & Design
Quiz
•
9th Grade - University
30 questions
Exam Laravel Final
Quiz
•
1st - 12th Grade
34 questions
Firma
Quiz
•
1st Grade - Professio...
30 questions
Personal Finance Career Planning and Financial Statements
Quiz
•
12th Grade
28 questions
Feedback Leary
Quiz
•
1st Grade - Professio...
30 questions
СИПЕ за пр-во на енергия от биомаса от отпадъци ТТ2
Quiz
•
12th Grade
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 Professional Development
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
12 questions
Add and Subtract Polynomials
Quiz
•
9th - 12th Grade
13 questions
Model Exponential Growth and Decay Scenarios
Quiz
•
9th - 12th Grade
27 questions
7.2.3 Quadrilateral Properties
Quiz
•
9th - 12th Grade
7 questions
Amoeba Sisters Dihybrid Cross Punnett Square
Interactive video
•
9th - 12th Grade
10 questions
The Holocaust: Historical Overview
Interactive video
•
9th - 12th Grade
10 questions
Key Features of Quadratic Functions
Interactive video
•
8th - 12th Grade
11 questions
Exponent Quotient Rules A1 U7
Quiz
•
9th - 12th Grade
