Search Header Logo

C Basic_Questions_1

Authored by Dinesh Kushwaha

Information Technology (IT)

University

Used 5+ times

C Basic_Questions_1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the C code?

Hello World! x;

Hello World! followed by a junk value

Compile time error

Hello World!

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The format identifier ‘%i’ is also used for _____ data type.


char

int

float


double

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true for variable names in C?

They can contain alphanumeric characters as well as special characters

It is not an error to declare a variable to be one of the keywords(like goto, static)

Variable names cannot start with a digit

ariable can be of any length

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is valid C expression?

int my_num = 100,000;

int my_num = 100000;

int my num = 1000;

int $my_num = 10000;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following C code?

Compile time error

Hello World! 34

Hello World! 1000

Hello World! followed by a junk value

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What will happen if the following C code is executed?

It will cause a compile-time error

It will cause a run-time error

It will run without any error and prints 3

It will experience infinite looping

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Directives are translated by the

  1. Pre-processor

  1. Compiler

  1. Linker

  1. Editor

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?