Search Header Logo

C introduction

Authored by sobha xavier

Computers

University

Used 3+ times

C introduction
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Who is the father of C language?

a) Steve Jobs

b) James Gosling

c) Dennis Ritchie

d) Rasmus Lerdorf

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which type of memory can read data but can’t write data?

Random only memory

Random-access memory

Read-only memory

None of the above

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What is a compiler?

system program that converts instructions to machine language

system program that converts machine language to high-level language

system program that writes instructions to perform

None of the mentioned

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet?

#include <stdio.h>

int main()

{

int a = 3, b = 5;

int t = a;

a = b;

b = t;

printf("%d %d", a, b);

return 0;

}

3 5

3 3

5 5

5 3

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code snippet?

#include <stdio.h>

int main()

{

int sum = 2 + 4 / 2 + 6 * 2;

printf("%d", sum);

return 0;

}

2

15

16

18

6.

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

Variable can be of any length

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following C code?

#include <stdio.h>

void main()

{

int x = 5;

if (x < 1)

printf("hello");

if (x == 5)

printf("hi");

else

printf("no");

}

hi

hello

no

hi hello

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?