
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
Kiến thức về Thuật toán và Chương trình
Quiz
•
8th Grade - University
17 questions
STIN (EM24) - Tecnologías 4.0 (T13)
Quiz
•
University - Professi...
15 questions
Pengolahan Citra IK-1 10.45
Quiz
•
University
20 questions
Artificial Intelligence CT-1
Quiz
•
University
20 questions
Micro Arch - CPUs & Fetch-Execute
Quiz
•
University
20 questions
Cloud Review Quiz
Quiz
•
University
20 questions
Python Recap
Quiz
•
7th Grade - University
20 questions
DWDM-2
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
