
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
10 questions
Quiz-1

Quiz
•
University
10 questions
array

Quiz
•
University
18 questions
If else Quiz

Quiz
•
University
15 questions
Structures and Union

Quiz
•
University
10 questions
Programación

Quiz
•
University
10 questions
HTML PHP C++

Quiz
•
University
10 questions
Programacion

Quiz
•
University
10 questions
Quiz 2

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University