
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
20 questions
Round 2

Quiz
•
University
20 questions
Round 3

Quiz
•
University
20 questions
Round 3-Tech Titans

Quiz
•
University
20 questions
Chương 2

Quiz
•
University
20 questions
Round 1

Quiz
•
University
17 questions
Basics of Programming with C

Quiz
•
University
20 questions
CodeMavarick

Quiz
•
University
20 questions
TECHTRIX2025 BUGHUNT SET6

Quiz
•
University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade