
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
Java Quiz 1
Quiz
•
University
10 questions
Java Arrays
Quiz
•
University
15 questions
CHAPTER 4 - PART 1
Quiz
•
University
10 questions
Tercer palcial INFORMÁTICA V QB-FM
Quiz
•
University
10 questions
Intro-Computação_3.3
Quiz
•
University
10 questions
Arreglos
Quiz
•
7th Grade - Professio...
11 questions
C Language
Quiz
•
10th Grade - University
15 questions
Bootcamp Day 3 - Java Array
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
christmas songs
Quiz
•
KG - University
20 questions
Holiday Trivia
Quiz
•
9th Grade - University
15 questions
Holiday Movies
Quiz
•
University
14 questions
Christmas Trivia
Quiz
•
3rd Grade - University
20 questions
Christmas Trivia
Quiz
•
University
8 questions
5th, Unit 4, Lesson 8
Lesson
•
KG - Professional Dev...
20 questions
Disney Trivia
Quiz
•
University