
enum in c

Quiz
•
Computers
•
University
•
Hard
Satheesh D
Used 1+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Rapid Round 1

Quiz
•
University
10 questions
C++ Quiz

Quiz
•
University
10 questions
C Union Enum Bitfields Macros 31May2023

Quiz
•
University
15 questions
C Quiz 5_M

Quiz
•
University
10 questions
CIS1101-programming practice2

Quiz
•
University
15 questions
c program

Quiz
•
University
7 questions
Pre-CA4

Quiz
•
University
5 questions
Reharshal For Coding

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University