What's the correct replacement for the faulty line?
#include

TECHTRIX2025 BUGHUNT SET5

Quiz
•
Other
•
University
•
Hard
Sarmistha Moharer
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
char ptr[] = "Hello";
ptr[0] = 'h';
char *ptr = strdup("Hello");
Both A and C
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What’s the correct way to allocate memory? int *arr; arr = malloc(5 * sizeof(int)); What should be done before using arr?
if (arr == NULL) exit(1);
memset(arr, 0, sizeof(arr));
free(arr);
Nothing, malloc never fails
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What’s wrong with this pointer code?
#include
val goes out of scope
p is uninitialized
No error
Memory leak
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What’s the output?
#include
5
10
11
Error
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be printed?
#include
10
11
Error
Undefined behavior
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does this bitwise code print?
#include
5
1
-5
0
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Find the output.
#include
0
2
Undefined
10
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
C Quiz

Quiz
•
University
15 questions
C Basics_1

Quiz
•
University
20 questions
Orientation Quiz

Quiz
•
University
20 questions
First Meet Sains Data 2022

Quiz
•
University
25 questions
C Programming

Quiz
•
12th Grade - University
20 questions
QUIZERIA

Quiz
•
University
20 questions
Round 3-Tech Titans

Quiz
•
University
20 questions
Quiz on Array

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