Search Header Logo

C QUIZZ

Authored by Nalini Bharath

Computers

University

Used 2+ times

C QUIZZ
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

1. What will be the output of the following C code?

  1. #include <stdio.h>

  2. void main()

  3. {

  4. int a[3] = {1, 2, 3};

  5. int *p = a;

  6. printf("%p\t%p", p, a);

  7. }

A. Same address is printed

B. Different address is printed

C.Compile time error

D. None of these

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a correct syntax to output "Hello World" in C?

A. printf("Hello World");

B. cout << "Hello World";

C. Console.WriteLine("Hello World");

D. System.out.printline("Hello World");

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you insert COMMENTS in C code?

A. -- This is a comment

B. # This is a comment

C. // This is a comment

D. * This is a comment

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When a variable is created in C, a memory address is assigned to the variable.?

A. TRUE

B. FALSE

C. None

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In C, code statements must end with a semicolon (;)

A. FALSE

B. TRUE

C. NONE

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you create a variable with the numeric value 5?

A. Num=5 int;

B. Num=5;

C. int Num=5;

D. val Num=5;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you create a variable with the floating number 2.8?

A. float num=2.8;

B. val num=2.8;

C. num=2.8 float;

D. num=2.8 double;

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?

Discover more resources for Computers