
Batch 2_Updated

Quiz
•
Computers
•
University
•
Easy
Arunsundar Balasubramanian
Used 1+ times
FREE Resource
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.
Create a free account and access millions of resources
Similar Resources on Wayground
35 questions
Kuis 2

Quiz
•
University
30 questions
Resumen Unidad 2 PP

Quiz
•
University
25 questions
C-BASICS

Quiz
•
University
27 questions
Fundamentos de Programación en C

Quiz
•
University
25 questions
Introduction to Java

Quiz
•
University
30 questions
CS 211 - Midterm Review

Quiz
•
University
30 questions
Code Twisters Round One Batch -1

Quiz
•
University
30 questions
C-Language Q1

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University