
C Programming Mastery Challenge

Quiz
•
Computers
•
University
•
Medium
REVATHI R
Used 1+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Qûîz

Quiz
•
University
25 questions
Compro. Final 1/64 part1

Quiz
•
University
15 questions
Arrays and Pointers in C

Quiz
•
University
19 questions
DSA Quest 1.0

Quiz
•
University
20 questions
Java, part I

Quiz
•
11th Grade - University
15 questions
ARRAYS AND FUNCTIONS

Quiz
•
University
20 questions
ISTE TECHNICAL

Quiz
•
University
20 questions
AlgoProg - Review Quiz

Quiz
•
University
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
12 questions
Civil War

Quiz
•
8th Grade - University
18 questions
Parent Functions

Quiz
•
9th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
19 questions
Primary v. Secondary Sources

Quiz
•
6th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
20 questions
Disney Trivia

Quiz
•
University