What will be the output of the following code?
#include

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
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 Quizizz
25 questions
C PROGRAMMING

Quiz
•
University
20 questions
CSE C Section

Quiz
•
University
20 questions
Programming Concepts in C

Quiz
•
University
20 questions
C Programming Quiz(session 1)

Quiz
•
University
20 questions
C Programming Assessment-1

Quiz
•
University
20 questions
Quantitative Aptitude Series

Quiz
•
University
20 questions
C - Structures

Quiz
•
University
20 questions
Code-A-Vita

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade