
Programming in C and Data Structures

Quiz
•
Computers
•
University
•
Medium
safreen safreen
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What year was the C programming language developed?
1990
1972
1970
1985
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the basic structure of a C program.
The main function is optional in a C program.
A C program is structured around classes and objects.
The basic structure of a C program includes preprocessor directives, the main function, variable declarations, statements, and a return statement.
The basic structure of a C program consists only of comments and whitespace.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
List the primary data types available in C.
string
int, char, float, double
array
boolean
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between a constant and a variable in C?
Both constants and variables can change their values.
A constant can change its value, while a variable cannot.
A constant cannot change its value, while a variable can.
A variable is a fixed value, while a constant is a placeholder.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Define operators in C and give examples of different types.
Increment Operators: ++ (increment), -- (decrement)
Examples of different types of operators in C include: 1. Arithmetic Operators: + (addition), - (subtraction), * (multiplication), / (division), % (modulus). 2. Relational Operators: == (equal to), != (not equal to), > (greater than), < (less than), >= (greater than or equal to), <= (less than or equal to). 3. Logical Operators: && (logical AND), || (logical OR), ! (logical NOT). 4. Bitwise Operators: & (bitwise AND), | (bitwise OR), ^ (bitwise XOR), ~ (bitwise NOT), << (left shift), >> (right shift). 5. Assignment Operators: = (simple assignment), += (add and assign), -= (subtract and assign), *= (multiply and assign), /= (divide and assign).
Control Operators: if, switch, for
String Operators: + (concatenation), - (substring)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the order of precedence in C expressions?
Parentheses, Unary operators, Addition/Subtraction, Multiplication/Division/Modulus
Shift, Relational, Equality, Conditional, Assignment
The order of precedence in C expressions is: Parentheses, Unary operators, Multiplication/Division/Modulus, Addition/Subtraction, Shift, Relational, Equality, Bitwise AND, Bitwise XOR, Bitwise OR, Logical AND, Logical OR, Conditional, Assignment, Comma.
Logical AND, Logical OR, Bitwise OR, Bitwise XOR
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you evaluate an arithmetic expression in C?
Use arithmetic operators in an expression and evaluate it.
Use a loop to evaluate each number in the expression.
Use only comparison operators to evaluate the expression.
Write the expression in a string format and print it.
Create a free account and access millions of resources
Similar Resources on Wayground
13 questions
SDS Recruitment Re-Quiz

Quiz
•
University
14 questions
Java Operators

Quiz
•
University
12 questions
C Basics

Quiz
•
University
10 questions
Java Quiz

Quiz
•
University
10 questions
HCI Information processing Quiz

Quiz
•
University
12 questions
Relational Algebra Concepts Worksheet

Quiz
•
University
10 questions
Talent Next Java MCQ-1

Quiz
•
University
15 questions
PreTest DFC20113 - Programming Fundamentals

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