
C-Volution (Intermediate)

Quiz
•
Information Technology (IT)
•
University
•
Hard
Sujal Bhagat
Used 1+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
What is the output of the following code
#include
5
10
15
Error
2.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
Which of the following is NOT a valid way to dynamically allocate memory?
malloc()
calloc()
realloc()
alloc()
3.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
What is the primary difference between malloc() and calloc()?
malloc() initializes allocated memory to zero, calloc() does not.
calloc() allocates memory for a single element, malloc() for multiple.
malloc() allocates memory in bytes, calloc() in number of elements.
There is no difference.
4.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
What is a dangling pointer?
A pointer that points to a memory location that has been freed.
A pointer that has not been initialized.
A pointer that points to a null value.
A pointer that points to an invalid memory address.
5.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
What is the output of the following code?
#include
5
6
7
Error
6.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
Which of the following is the correct way to declare a function pointer?
int (*func)(int, int);
int *func(int, int);
int func(int, int);
int *(func)(int, int);
7.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
What does the const keyword signify when used with a pointer?
The pointer cannot be changed.
The value pointed to by the pointer cannot be changed.
Both the pointer and the value pointed to cannot be changed.
It has no effect.
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Quiz 2 Pempros

Quiz
•
University
16 questions
Mảng 2 chiều trong C

Quiz
•
University
16 questions
Session 08: Array

Quiz
•
University
15 questions
Code2Duo

Quiz
•
University
20 questions
Pengantar Teknologi Informasi

Quiz
•
University
15 questions
CMDP2063 Unix and C Programming (Revision)

Quiz
•
University
20 questions
Revissão - Linguagem C (str, fun, stru, vt+mt,)

Quiz
•
University
23 questions
C++ Functions Quiz

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade