What is the output of the following code
#include

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
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 Quizizz
16 questions
Kuis Uji Pemahaman Python Variabel, Sintaks Dasar, Type Data

Quiz
•
11th Grade - University
15 questions
Punteros y Memoria Dinamica

Quiz
•
University
20 questions
DATA STRUCTUIR Quiz1 (AIML)

Quiz
•
University
17 questions
Quiz de Programação em C

Quiz
•
University
17 questions
Session 19: Pointer

Quiz
•
University
15 questions
BYTS ASSESSMENT

Quiz
•
University
15 questions
Session 04: Branching statements

Quiz
•
University
18 questions
Codean - Java Rekursi

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