
Batch 2_Updated
Quiz
•
Computers
•
University
•
Practice Problem
•
Easy
Arunsundar Balasubramanian
Used 1+ times
FREE Resource
Enhance your content in a minute
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary difference between static keyword used inside a function and outside a function (at file scope)?
Inside a function, it makes the variable constant; outside, it limits visibility to the current file.
Inside a function, it preserves the variable's value between calls; outside, it limits visibility to the current file.
Inside a function, it makes the variable accessible only within the function; outside, it makes the variable global.
Inside a function, it makes the variable thread-safe; outside, it makes the variable read-only.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider this code: int *ptr = malloc(10 * sizeof(int));. What is the most likely problem if malloc fails?
The program will crash immediately.
ptr will be a null pointer.
ptr will point to garbage memory.
The program will compile with a warning.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to deallocate memory allocated with calloc?
free(calloc_ptr);
dealloc(calloc_ptr);
free(calloc_ptr, size); (where size is the allocated size)
delete calloc_ptr;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a potential issue with using gets()?
It's slow.
It can cause a buffer overflow.
It can only read strings of a fixed length.
It's deprecated but still safe to use if you're careful.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code snippet?
#include
1
2
3
4
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these is NOT a standard C header file?
stdio.h
string.h
iostream.h
math.h
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does volatile keyword signify in C?
The variable's value will not be changed.
The variable might be changed by something outside the program's control.
The variable will be stored in a register.
The variable is thread-safe.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
25 questions
Java Review
Quiz
•
9th Grade - University
25 questions
Machine Learning (Concept Learning)
Quiz
•
University
25 questions
Quiz kotajako1
Quiz
•
University
25 questions
Information and Technology Finals
Quiz
•
University
25 questions
MYSQL QUIZ 1
Quiz
•
University
25 questions
Quiz No. 1 - Functions in JavaScript
Quiz
•
University
25 questions
AI 900 - pt 5
Quiz
•
University
25 questions
Профессиональная иностранная терминология_3
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
christmas songs
Quiz
•
KG - University
20 questions
Holiday Trivia
Quiz
•
9th Grade - University
15 questions
Holiday Movies
Quiz
•
University
14 questions
Christmas Trivia
Quiz
•
3rd Grade - University
20 questions
Christmas Trivia
Quiz
•
University
8 questions
5th, Unit 4, Lesson 8
Lesson
•
KG - Professional Dev...
20 questions
Disney Trivia
Quiz
•
University
