
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
AI 900 - pt 5
Quiz
•
University
25 questions
Профессиональная иностранная терминология_3
Quiz
•
University
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
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
