Which of the following is a valid variable name in C?

C Programming Quiz

Quiz
•
Computers
•
Professional Development
•
Hard
SI HACKATHON
FREE Resource
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int 1stVariable
firstVariable
first variable
None of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output? #include int main() { int a = 5, b = 10; printf("%d\n", a + b); return 0; }
5
10
15
Compilation Error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you insert comments in C?
// comment
/* comment */
// comment /* comment */
All of the above
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function is used to allocate memory dynamically in C?
malloc()
calloc()
realloc()
All of the above
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? #include int main() { printf("%d\n", sizeof(char)); return 0; }
1
2
4
Undefined
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a data type in C?
int
float
real
char
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? #include int main() { int x = 10; x += 5; printf("%d\n", x); } return 0;
10
15
5
Compilation Error
Create a free account and access millions of resources
Similar Resources on Wayground
32 questions
WP CHAPTER1 TO 3

Quiz
•
Professional Development
25 questions
LIST-TUPLES-SET-DICTIONARY

Quiz
•
Professional Development
29 questions
Flutter_Q3

Quiz
•
Professional Development
25 questions
C second module quiz

Quiz
•
Professional Development
25 questions
C module 1 second quiz

Quiz
•
Professional Development
30 questions
Python - Basic Data, Structure, and Concepts

Quiz
•
Professional Development
30 questions
Quiz 3.4

Quiz
•
Professional Development
25 questions
DATASTRUCTURES-3SEM

Quiz
•
Professional Development
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade