
C Programming Quiz

Quiz
•
Computers
•
University
•
Medium
Ms. 16458
Used 3+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
#include
True
False
Compile-time error
Undefined behavior
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between malloc() and calloc() in C?
malloc() initializes allocated memory, calloc() does not
calloc() initializes allocated memory, malloc() does not
malloc() is used for static allocation, calloc() for dynamic allocation
Both are identical
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following function declarations is correct in C?
int function(int x, y);
int function(int x, int y) { return x + y; }
int function(int x, int y);
function(int x, int y) -> int;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the size of an integer on a 64-bit system using GCC (typically)?
4 bytes
8 bytes
2 bytes
Depends on the compiler
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of this program?
#include
10 5
5 10
Compile-time error
Undefined behavior
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the sizeof operator return?
The size of a pointer
The size of a variable or type in bits
The size of a variable or type in bytes
None of the above
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of this program?
#include
10
20
30
40
Create a free account and access millions of resources
Similar Resources on Wayground
30 questions
C-Programming

Quiz
•
University
25 questions
Aptitude Competition(FY)

Quiz
•
University
20 questions
'C' Operators in c, If statement(TEST-2)

Quiz
•
University
20 questions
pointers in C

Quiz
•
University
30 questions
Branch Master CSE Round 1(Quiz)

Quiz
•
University
20 questions
Quiz on Java

Quiz
•
University
20 questions
Pointers

Quiz
•
University
20 questions
Computer Fundamental and C Programming Concept

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University