
C Programming Challenge for Students

Quiz
•
Others
•
1st Grade
•
Hard
Kaustubh Pandey
Used 3+ times
FREE Resource
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a pointer in C?
A pointer is a variable that stores a string in C.
A pointer is a special kind of loop in C.
A pointer is a type of function in C.
A pointer is a variable that holds the address of another variable in C.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a pointer variable?
int *ptr;
*int ptr;
pointer int ptr;
int ptr;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'malloc' function?
To create a new thread in a program.
To initialize variables to zero.
To allocate memory dynamically.
To free up memory after use.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you free dynamically allocated memory?
Use 'free(pointer)' for malloc/calloc/realloc and 'delete pointer' for new.
Use 'dispose(pointer)' for malloc/calloc/realloc
Invoke 'clear(pointer)' to free memory
Call 'remove(pointer)' for new allocations
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between 'fopen' and 'fclose'?
'fopen' opens a file; 'fclose' closes a file.
'fopen' opens a directory; 'fclose' opens a file.
'fopen' deletes a file; 'fclose' creates a file.
'fopen' reads a file; 'fclose' writes to a file.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you read data from a file in C?
Use read() to directly access the file contents.
Use file_get_contents() to read the entire file at once.
Use fopen() to open the file, then read with fscanf() or fgets(), and close with fclose().
Open the file with open() and read using readlines().
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a structure in C?
A structure in C is a way to define constants.
A structure in C is a function that performs calculations.
A structure in C is a user-defined data type that groups different data types together.
A structure in C is a built-in data type for integers.
Create a free account and access millions of resources
Similar Resources on Wayground
16 questions
Belajar Corel Draw untuk Pemula

Quiz
•
1st - 5th Grade
15 questions
kuis kelas 3

Quiz
•
1st Grade
16 questions
Uji Pengetahuan Desain Grafis

Quiz
•
1st Grade
12 questions
rozdział 8

Quiz
•
1st - 5th Grade
20 questions
Uji Pengetahuan Informatika Kelas 7

Quiz
•
1st Grade
19 questions
tinhoc

Quiz
•
1st - 5th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Others
18 questions
Hispanic Heritage Month

Quiz
•
KG - 12th Grade
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
addition

Quiz
•
1st - 3rd Grade
20 questions
Subject and predicate in sentences

Quiz
•
1st - 3rd Grade
20 questions
Addition and Subtraction facts

Quiz
•
1st - 3rd Grade
20 questions
Place Value

Quiz
•
KG - 3rd Grade
10 questions
Exploring Properties of Matter

Interactive video
•
1st - 5th Grade
10 questions
Odd and even numbers

Quiz
•
1st - 2nd Grade