
enum in c
Authored by Satheesh D
Computers
University
Used 1+ 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
30 sec • 1 pt
What will be the output of the following C code?
main()
{ enum result
{pass, fail};
enum result s1,s2;
s1=pass; s2=fail;
printf("%d",s1); }
error
pass
fail
0
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
enum example {a = 1, b, c};
enum example example1 = 2;
enum example answer()
{ return example1; }
int main()
{
(answer() == a)? printf("yes"): printf("no"); return 0; }
yes
no
2
error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include<stdio.h>
#define MAX 4
enum s1 { a,b=3,c };
main()
{ if(MAX!=c)
printtf("hello");
else printf("welcome"); }
error
hello
welcome
2
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Arithmetic operations such as addition, subtraction, multiplication and division are allowed on enumerated constants.
true
false
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include<stdio.h>
enum sum
{
a=1,b,c,d,e
};
int main()
{ printf("%d",b*c+e-d); }
error
7
2
4
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include<stdio.h>
enum test
{ a,b,c=5 };
int main()
{ enum test s;
b=10;
printf("%d",b); }
error
10
1
4
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the similarity between a structure, union and enumeration?
All of them let you define new values
All of them let you define new data types
All of them let you define new pointers
All of them let you define new structures
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
2023-Quiz 1 Metodologi Penelitian
Quiz
•
University
13 questions
BACS3323 Chapter 4 -Flocking Algorithm
Quiz
•
University
10 questions
C Sharp-conceptos básicos
Quiz
•
University
10 questions
Flutter Quiz
Quiz
•
University
14 questions
Microprocesador
Quiz
•
10th Grade - Professi...
15 questions
DCN1A - OSI & TCP/IP MODEL
Quiz
•
University
15 questions
Definições sobre Projetos e o Manifesto Ágil
Quiz
•
12th Grade - University
13 questions
Processing Quiz
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