1. What is the format specifier for printing an integer in C?

C programming 2

Quiz
•
Fatin Awad
•
Computers
•
University
•
1 plays
•
Hard
Student preview

16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
%i
%d
%s
%f
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
2. How do you include a header file in C?
<include header.h>
<header.h>
#include "header.h"
include "header.h"
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
3. What is the result of the expression 10 % 3 in C?
0
3
3.33
1
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
4. How do you declare a constant pointer to an integer variable in C?
const * int ptr;
int * const ptr;
const int * ptr;
int const * ptr;
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
5. What is the purpose of the "do-while" loop in C?
To execute a block of code repeatedly until a condition is met
To iterate over the elements of an array
To break out of a loop prematurely
To execute a block of code at least once, then repeatedly until a condition is met
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
7. How do you access a specific element in an array in C?
arr(index)
arr[index]
arr{index}
arr.index
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
8. How do you declare a function pointer in C?
void (*ptr)();
(*ptr)() void;
(*ptr)();
void *ptr();
8.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
1
2
3
Error
9.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
9. What is the output of the following code snippet?
printf("%d", sizeof(float));
2
4
8
error
10.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
10. What is the output of the following code snippet?
int x = 2;
int y = 3;
int result = (x > y) ? x++ : ++y;
printf("%d", result);
2
3
4
error
Explore all questions with a free account
Similar Resources on Quizizz
12 questions
C Practice Test 1

Quiz
•
University
15 questions
Python Basics

Quiz
•
KG - University
20 questions
Zenorix 2023

Quiz
•
University
13 questions
C programming-1

Quiz
•
University
20 questions
Code-A-Vita

Quiz
•
University
20 questions
C programming syntax quiz

Quiz
•
University
19 questions
C Language Array Quiz

Quiz
•
University
20 questions
CCE-III Programming in C Language

Quiz
•
University
Popular Resources on Quizizz
17 questions
CAASPP Math Practice 3rd

Quiz
•
3rd Grade
20 questions
math review

Quiz
•
4th Grade
21 questions
6th Grade Math CAASPP Practice

Quiz
•
6th Grade
13 questions
Cinco de mayo

Interactive video
•
6th - 8th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
10 questions
4th Grade Math CAASPP (part 1)

Quiz
•
4th Grade
45 questions
5th Grade CAASPP Math Review

Quiz
•
5th Grade
Discover more resources for Computers
15 questions
Disney Trivia

Quiz
•
University
44 questions
APES Exam Review 2017

Quiz
•
11th Grade - University
22 questions
TSIA2 Math - TSI MATH 2.0 Review 1 (950ish)

Quiz
•
6th Grade - University
25 questions
APUSH Decades Review

Quiz
•
9th Grade - University
12 questions
Scientific Notation

Quiz
•
University
96 questions
World History 1 Sol Review

Quiz
•
9th Grade - University
20 questions
Unit Circle & Trig

Quiz
•
10th Grade - University
20 questions
Preterito vs. Imperfecto

Quiz
•
KG - University