Search Header Logo

C PROGRAMMING 2

Authored by praveen s

Computers

University

Used 1+ times

C PROGRAMMING 2
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

10 sec • 1 pt

What is an example of iteration in C?

for

while

do-while

all of the mentioned

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Functions in C Language are always _________

Internal

External

Both Internal and External

External and Internal are not valid terms for functions

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which function is used to concatenate two strings in C?

  1. concat()

  1. cat()

  1. stringcat()

  1. strcat()

4.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which is the correct syntax to declare an array in C?

  1. data_type array_name[array_size];

  1. data_type array_name{array_size};

  1. data_type array_name[];

  1. All of the above

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will be the output of the following C program?

#include <stdio.h>

int main()

{

int x[5] = { 10, 20, 30 };

printf("%ld", sizeof(x)/sizeof(x[0]));

return 0;

}

  1. 3

4

5

6

6.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What is a function in C?

  1. User defined data type

  1. Block of code which can be reused

  1. Declaration syntax

  1. None of these

7.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which of these is not a valid parameter passing method in C?

  1. Call by value

  1. Call by reference

  1. Call by pointer

  1. All of these

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