Programming in C and Data Structures

Programming in C and Data Structures

University

10 Qs

quiz-placeholder

Similar activities

IEEE_Round2

IEEE_Round2

University

13 Qs

Evolutionary Algorithm Variants

Evolutionary Algorithm Variants

University

10 Qs

AP Computer Science Principles Unit 4 Review

AP Computer Science Principles Unit 4 Review

9th Grade - University

15 Qs

Python

Python

University - Professional Development

10 Qs

Boolean Algebra - Laws

Boolean Algebra - Laws

12th Grade - University

9 Qs

Briefing Operator Java

Briefing Operator Java

University

10 Qs

C++ : Assignment 6

C++ : Assignment 6

University

10 Qs

BCA CLUB ACTIVITY 2023

BCA CLUB ACTIVITY 2023

University

14 Qs

 Programming in C and Data Structures

Programming in C and Data Structures

Assessment

Quiz

Computers

University

Medium

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?