Search Header Logo

Fundamentals of C and C++ Programming

Authored by DILEEP KUMAR SAHU

Other

University

Used 1+ times

Fundamentals of C and C++ Programming
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary purpose of a compiler?

To optimize high-level code for better performance.

To debug high-level code for errors.

To execute high-level code directly without translation.

The primary purpose of a compiler is to translate high-level code into machine code.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explain the difference between C and C++.

C is a high-level language; C++ is a low-level language.

C supports classes; C++ does not support classes.

C is procedural; C++ is object-oriented.

C is used for system programming; C++ is only for web development.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a variable in programming?

A variable is a command that executes a specific task in the program.

A variable is a symbolic name for a storage location in memory that can hold a value and can be changed during program execution.

A variable is a fixed value that cannot be changed during program execution.

A variable is a type of function that performs calculations.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a variable in C/C++?

= ;

declare ;

= ;

To declare a variable in C/C++, use the syntax: ; = ;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a function and why is it used?

A function is a reusable block of code that performs a specific task.

A function is a method for creating user interfaces.

A function is a graphical representation of data.

A function is a type of variable that stores data.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the main() function in C/C++?

The main() function is where all the functions are declared.

The main() function is responsible for memory management.

The main() function is used for defining global variables.

The main() function is the entry point of a C/C++ program.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are data types in C/C++?

Primitive types, composite types, functional types

Integer types, floating-point types, string types

Static types, dynamic types, abstract types

Basic types, derived types, user-defined types

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?