
Basics of C and DS

Quiz
•
Education
•
University
•
Hard
Yelipe Rishi
Used 3+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct syntax to declare a variable in C?
A) int num;
B) int = num;
C) num int;
D) variable int;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
2.What does the sizeof operator do in C?
A) Returns the size of a variable in bytes
B) Returns the size of a variable in bits
C) Allocates memory dynamically
D) None of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
3.Which function is used to get input from the user in C?
A) scanf()
B) printf()
C) input()
D) gets()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
4.What is the correct way to declare a pointer to an integer in C?
A) int *ptr;
B) pointer int ptr;
"C) int ptr*;
D) int ptr;
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
5.Which operator is used to access a member of a structure through a pointer?
A) . (dot operator)
B) -> (arrow operator)
C) & (address-of operator)
D) * (dereference operator)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
6.What is the time complexity of accessing an element in an array?
A) O(1)
B) O(n)
C) O(log n)
D) O(n^2)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
7.In a singly linked list, which operation is performed in O(1) time complexity?
A) Inserting at the end
B) Deleting from the beginning
C) Accessing an element by index
D) Inserting at a specific position
Create a free account and access millions of resources
Similar Resources on Wayground
18 questions
SQL

Quiz
•
University
12 questions
Квіз з програмування: Вказівники та динамічна пам'ять

Quiz
•
University
20 questions
pps quiz 2023

Quiz
•
University
12 questions
JAVA FUNDAMENTALS

Quiz
•
University
15 questions
pointers quizz

Quiz
•
University
20 questions
C Programming Quiz

Quiz
•
University
10 questions
Compose Camp - Session 2 Quiz

Quiz
•
University
11 questions
Python Variable and Datatype Quiz

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade