
Challenging C Programming Concepts
Authored by REVATHI R
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code: int a = 10; int *p = &a; printf('%d', *p);?
20
*p
10
10.0
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following correctly allocates memory for an array of 10 integers?
int array(10);
int array[10];
int array[] = new int[10];
int[10] array;
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the result of the expression: sizeof(arr) / sizeof(arr[0]) if arr is an array of integers?
total memory allocated for arr
size of the array in bytes
size of the first element in bytes
number of elements in arr
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How do you declare a pointer to a function that takes an int and returns void?
void pointerName(int);
int *pointerName(void);
void (*pointerName)(int);
void (*pointerName)(void);
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the purpose of the 'free' function in C?
To allocate memory on the stack.
To deallocate memory previously allocated on the heap.
To read data from a file.
To initialize variables in C.
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following statements correctly initializes a string in C?
char* str = "Hello, World!";
string str = "Hello, World!";
char str = 'Hello, World!';
char* str = Hello, World!;
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code: char str[] = 'Hello'; printf('%c', str[1]);?
e
H
l
o
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
15 questions
Pra UAS Algoritma dan Pemrograman Lanjut
Quiz
•
University
15 questions
NSCC-CODE TO COIN
Quiz
•
University
19 questions
программирование
Quiz
•
9th Grade - University
20 questions
Algoritma Remedial RPL
Quiz
•
University
20 questions
PERULANGAN WHILE DO
Quiz
•
University
15 questions
Javascript Array dan Object
Quiz
•
University
20 questions
IT Essential UIUX Chapter 03 (Typography)
Quiz
•
University
20 questions
Quiz on Java
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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