
Programming in C

Flashcard
•
Computers
•
University
•
Hard
Mohana KR
FREE Resource
Student preview

15 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Which of the following is not necessary for every C program? Options: Header file, Preprocessor directive, The use of a keyword, The main function
Back
Preprocessor directive
2.
FLASHCARD QUESTION
Front
Which of the following statements is incorrect about macros?
- Macros and function calls work differently
- It is always defined in capital letters
- Macros can be undefined using #undef
- You can declare macros with arguments
Back
It is always defined in capital letters
3.
FLASHCARD QUESTION
Front
Predict the output of the following code segment: // Add stdio.h header file in below code
int main() { const int limit = 10; limit++; printf("%d", limit); return 0; }
Back
Compile error
4.
FLASHCARD QUESTION
Front
Predict the output of the following code segment: // Add stdio.h header file in below code
int main () {
char line [] = "Welcome to DataFlair tutorials on C Programming";
char string1[10], string2[10], string3[10];
sscanf (line,"%*s %*s %s %*s %*s %s %s",string1, string2, string3); printf ("%s %s %s \n", string1, string2, string3); return 0; }
Back
DataFlair C programming
5.
FLASHCARD QUESTION
Front
Which mathematical function would you use to round off 4.23 to 5?
Back
ceil(4.23)
6.
FLASHCARD QUESTION
Front
Which of the following has a global scope in the program? Options: Formal parameters, Constants, Macros, Local variables
Back
Macros
7.
FLASHCARD QUESTION
Front
Predict the output of the following code segment:
```c
// Add stdio.h header file in below code
int main()
{
int array[10] = {3, 0, 8, 1, 12, 8, 9, 2, 13, 10};
int x, y, z;
x = ++array[2];
y = array[2]++;
z = array[x++];
printf("%d %d %d", x, y, z);
return 0;
}
```
Back
10 9 10
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
AP CSA Unit 1

Flashcard
•
12th Grade
11 questions
Computer Programming

Flashcard
•
University
11 questions
Java String Objects & Methods

Flashcard
•
12th Grade
17 questions
AP CSA Unit 3 Review

Flashcard
•
12th Grade
7 questions
CS 341 Lab 1 Spring 2024

Flashcard
•
University
19 questions
AVINYA 2K25

Flashcard
•
University
13 questions
Understanding Programming and Coding

Flashcard
•
University
10 questions
Arrays

Flashcard
•
10th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

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

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

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

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University