C Programming Quiz-1

C Programming Quiz-1

University

10 Qs

quiz-placeholder

Similar activities

Programming practices - C programming

Programming practices - C programming

University

9 Qs

TECHNICAL C JIT03

TECHNICAL C JIT03

University

15 Qs

Programming 1

Programming 1

University

10 Qs

C Practice Test 1

C Practice Test 1

University

12 Qs

Tech Quiz

Tech Quiz

University

10 Qs

Day 1 Quiz

Day 1 Quiz

11th Grade - University

12 Qs

Quiz on Basics of C

Quiz on Basics of C

University

10 Qs

PK (A) - PRE TEST 1

PK (A) - PRE TEST 1

University

10 Qs

C Programming Quiz-1

C Programming Quiz-1

Assessment

Quiz

Computers

University

Hard

Created by

Baburaj KV

Used 5+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of following program ?


#include <stdio.h>

void main() {

printf("Hello "World"\n");

}

Hello “World”

Hello

error

none of above

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of following program ?

#include <stdio.h>

void main() {

printf("Hello\rWorld\n");

}

HelloWorld

Hello World

Hello

World

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be output of the following program ?


#include <stdio.h>

void main() {

int i=1, j=2;

printf("%d\t%d\t%d\n", (++i+j++), i, j);

}

5 2 2

4 2 2

4 2 3

syntax error

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following program?

#include <stdio.h>

void main() {

if(1 || 0)

printf("true");

else

printf("false");

}

true

false

error

none of above

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Predict output of the following program


#include <stdio.h>

void main() {

int i, j;

for(i=1;i<=5;i++) {

for(j=1;j<=5;j++); {

if(i==j)

printf("%d\t%d\t", i, j);

}

}

}

1 1 2 2 3 3 4 4 5 5

6 6

no output

syntax error

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following program?

#include <stdio.h>

void main() {

int i, n=5;

for(i=1; i<=n;i++) {

printf("%d", n/(n-i));

}

}

1 1 2 5

no output

infinite loop

error

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following program generates sequence ‘1 2 3 4’ ?

#include <stdio.h>

void main() {

for(int i=1; i<=5;i++) {

if(i==5)

break;

printf("%d\t", i);

}

}

#include <stdio.h>

void main() {

for(int i=1; i<=5;i++); {

if(i==5)

continue;

printf("%d\t", i);

}

}

both a) and b)

none of above

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?