
C programming 2

Quiz
•
Computers
•
University
•
Hard
Fatin Awad
Used 1+ times
FREE Resource
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
1. What is the format specifier for printing an integer in C?
%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();
Create a free account and access millions of resources
Similar Resources on Wayground
13 questions
#include <\c>

Quiz
•
University
15 questions
C Pointers 17May2023

Quiz
•
University
20 questions
pointers in C

Quiz
•
University
20 questions
Computer Fundamental and C Programming Concept

Quiz
•
University
15 questions
C PROGRAMMING 2

Quiz
•
University
15 questions
Milking Minds 2 17-01-24

Quiz
•
University
20 questions
Pointers

Quiz
•
University
15 questions
C programming

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University