
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
10 questions
POP QUIZ 4 (DFC40243)
Quiz
•
University
10 questions
cp06-01-1D-Array
Quiz
•
University
10 questions
6-文件操作
Quiz
•
University
10 questions
Listen in Python
Quiz
•
University
13 questions
Chap 1: What is a program made of?
Quiz
•
University
10 questions
MS Excel - Day 04
Quiz
•
University
14 questions
LA7.C7: Turtle Graphics
Quiz
•
9th Grade - University
10 questions
ITESA Roadmap Event 12-09-24
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