
C Programming Mastery Challenge
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
REVATHI R
Used 1+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is a pointer in C and how is it declared?
A pointer in C is declared using the syntax 'type *pointerName;', for example, 'int *ptr;'
A pointer in C is declared using 'type &pointerName;'.
A pointer in C is declared with the syntax 'pointerName : type;'.
A pointer in C is a variable that holds a string value.
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Explain the difference between a pointer and a regular variable.
A pointer holds a memory address, whereas a regular variable holds a value.
A regular variable can hold a memory address.
Pointers can only store integer values.
A pointer is a type of regular variable.
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How do you dynamically allocate memory in C?
Use 'new' to allocate memory in C.
Use 'malloc', 'calloc', or 'realloc' to dynamically allocate memory in C.
Use 'free' to allocate memory in C.
Use 'printf' to allocate memory in C.
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the purpose of the 'free' function in C?
To copy data from one memory location to another.
The purpose of the 'free' function in C is to deallocate previously allocated memory.
To initialize memory to zero.
To allocate new memory for variables.
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code: int a = 5; int *p = &a; printf('%d', *p);?
5
4
6
10
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the precedence of the arithmetic operators in C?
Parentheses, Addition/Subtraction, Multiplication/Division/Modulus, Unary operators
Unary operators, Addition/Subtraction, Parentheses, Division/Multiplication
Parentheses, Unary operators, Multiplication/Division/Modulus, Addition/Subtraction
Addition/Subtraction, Parentheses, Unary operators, Division/Modulus
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How do you increment a pointer in C?
ptr+=1
ptr++
ptr--
ptr=ptr+1
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
20 questions
Algoritma Remedial RPL
Quiz
•
University
20 questions
Skill Competition Quiz 2024
Quiz
•
10th Grade - University
15 questions
[CEH4H3] Sistem Tertanam Ganjil 1819 Kuis Online 2
Quiz
•
University
18 questions
Строка CMD
Quiz
•
University
15 questions
Introducción Redes Tele1 IB
Quiz
•
10th Grade - University
20 questions
2. Ayo Main Quiz Lagi
Quiz
•
University - Professi...
20 questions
SOFTWARE 7I
Quiz
•
7th Grade - University
20 questions
Spreadsheet Fundamentals - Quiz2
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
