
C- Operators
Quiz
•
Computers
•
University
•
Hard
sobha xavier
Used 3+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
#include <stdio.h>
void main()
{
int a = 3;
int b = ++a ;
printf("Value of b is %d", b);
}
3
4
error
undefined
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the precedence of arithmetic operators (from highest to lowest)?
a) %, , /, +, –
b) %, +, /, , –
c) +, -, %, , /
d) %, +, -, , /
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following data type will throw an error on modulus operation(%)?
float
int
short
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int a = 10, b = 5, c = 5;
int d;
d = a == (b + c);
printf("%d", d);
}
Error
1
10
0
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 1, y = 0, z = 5;
int a = x && y || z++;
printf("%d", z);
}
a) 6
b) 5
c) 0
d) Varies
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the final value of d in the following C code?
#include <stdio.h>
int main()
{
int a = 10, b = 5, c = 5;
int d;
d = b + c == a;
printf("%d", d);
}
a) Syntax error
b) 1
c) 5
d) 10
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int k = 8;
int x = 0 == 1 && k++;
printf("%d%d\n", x, k);
}
a) 0 9
b) 0 8
c) 1 8
d) 1 9
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Looping in C
Quiz
•
University
15 questions
Common errors in C programming
Quiz
•
University
8 questions
Quiz - 1
Quiz
•
University
11 questions
C Language
Quiz
•
10th Grade - University
10 questions
Array in C
Quiz
•
University
10 questions
C Language
Quiz
•
University
10 questions
C_Quiz2
Quiz
•
University
10 questions
Day 7 Assessment -2
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
