
5CSE1_T&P questions

Quiz
•
Other
•
University
•
Hard
Gouthami Velakanti
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What will be the output of the following C function?
#include <stdio.h>
enum birds {SPARROW, PEACOCK, PARROT};
enum animals {TIGER = 8, LION, RABBIT, ZEBRA};
int main()
{
enum birds m = TIGER;
int k;
k = m;
printf("%d\n", k);
return 0;
}
0
Compile time error
1
8
2.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What will be the final value of x in the following C code?
#include <stdio.h>
void main()
{
int x = 5 * 9 / 3 + 9;
}
3.75
Depends on compiler
24
3
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following C code considering the size of a short int is 2, char is 1 and int is 4 bytes?
#include <stdio.h>
int main()
{
short int i = 20;
char c = 97;
printf("%d, %d, %d\n", sizeof(i), sizeof(c), sizeof(c + i));
return 0;
}
a) 2, 1, 2
b) 2, 1, 1
c) 2, 1, 4
d) 2, 2, 8
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the value of the following assignment expression?
(x = foo())!= 1 considering foo() returns 2
2
True
1
0
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Comment on the following C statement.
n = 1; printf("%d, %dn", 3*n, n++);
Output will be 3, 2
Output will be 3, 1
Output will be 6, 1
Output is compiler dependent
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the data type returned for the following C function?
#include <stdio.h>
int func()
{
return (double)(char)5.0;
}
char
int
double
multiple type-casting in return is illegal
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this C code?
#include <stdio.h>
int main()
{
float f = 0.1;
if (f == 0.1)
printf("True");
else
printf("False");
}
True
False
Create a free account and access millions of resources
Similar Resources on Wayground
14 questions
C PRogram

Quiz
•
University
10 questions
Algorithm and Programming Quiz

Quiz
•
University
16 questions
C Programming Quiz

Quiz
•
University
20 questions
Kelas PHP

Quiz
•
University
20 questions
CODESTRY ROUND 1

Quiz
•
University
18 questions
MIDTERM EXAM

Quiz
•
University
10 questions
Списки. PYTHON

Quiz
•
3rd Grade - University
20 questions
прога 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 Other
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