
C- Operators
Authored by sobha xavier
Computers
University
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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);
}
#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
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
15 questions
Cryptographie et Blockchain - CS2I
Quiz
•
University - Professi...
10 questions
Què en saps de GSuite?
Quiz
•
University - Professi...
10 questions
Soal SKD
Quiz
•
University - Professi...
15 questions
AV1/R1 2TEC_PM_1 A 11_História e Reconhecimento da UX
Quiz
•
1st Grade - University
13 questions
L1 - Computer Networks
Quiz
•
University
15 questions
4.6.4 Logic Gates
Quiz
•
10th Grade - Professi...
11 questions
NHÓM 3: XÁC ĐỊNH DỰ ÁN
Quiz
•
University
15 questions
C++ Switch and If Else Statements
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