
C Practice Test 1
Authored by Dipti Ranjan Lenka
Computers
University

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
12 questions
Show all answers
1.
OPEN ENDED QUESTION
30 sec • Ungraded
Branch
Evaluate responses using AI:
OFF
2.
OPEN ENDED QUESTION
30 sec • Ungraded
Roll No
Evaluate responses using AI:
OFF
3.
OPEN ENDED QUESTION
30 sec • Ungraded
Name
Evaluate responses using AI:
OFF
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Suppose that in a C program snippet, followings statements are used. i) sizeof(int); ii) sizeof(int*); iii) sizeof(int**); Assuming size of pointer is 4 bytes and size of int is also 4 bytes, pick the most correct answer from the given options.
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Assume int is 4 bytes, char is 1 byte and float is 4 bytes. Also, assume that pointer size is 4 bytes (i.e. typical case) char *pChar; int *pInt; float *pFloat; sizeof(pChar); sizeof(pInt); sizeof(pFloat); What’s the size returned for each of sizeof() operator?
6.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
#include "stdlib.h" int main() { int *pInt; int **ppInt1; int **ppInt2; pInt = (int*)malloc(sizeof(int)); ppInt1 = (int**)malloc(10*sizeof(int*)); ppInt2 = (int**)malloc(10*sizeof(int*)); free(pInt); free(ppInt1); free(*ppInt2); return 0; } Choose the correct statement w.r.t. above C program.
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
#include "stdio.h" int main() { void *pVoid; pVoid = (void*)0; printf("%lu",sizeof(pVoid)); return 0; } Pick the best statement for the above C program snippet.
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
10 questions
FLASH
Quiz
•
University
14 questions
JavaScript
Quiz
•
University
10 questions
Java Programming Basics
Quiz
•
University
10 questions
Analysis of Algorithms
Quiz
•
University
10 questions
python quiz
Quiz
•
6th Grade - Professio...
10 questions
TIU Quiz-4
Quiz
•
University
15 questions
BASIC C QUIZ
Quiz
•
University
15 questions
Object Oriented Programming Assessment 1
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