TECHNICAL C PROGRAM

TECHNICAL C PROGRAM

University

10 Qs

quiz-placeholder

Similar activities

pointers and structures

pointers and structures

University

10 Qs

Round 2 for Preplacement Bootcamp

Round 2 for Preplacement Bootcamp

University

15 Qs

Web Designing Quiz-2

Web Designing Quiz-2

University

10 Qs

Pengantar Programming DDP D4 JTK POLBAN

Pengantar Programming DDP D4 JTK POLBAN

University

10 Qs

HTML

HTML

University

13 Qs

Teste python- Unesp-Jaboticabal

Teste python- Unesp-Jaboticabal

University

10 Qs

07 - Map

07 - Map

University

15 Qs

IOTA : Web Development Bootcamp Quiz 2

IOTA : Web Development Bootcamp Quiz 2

University

14 Qs

TECHNICAL C PROGRAM

TECHNICAL C PROGRAM

Assessment

Quiz

Computers

University

Hard

Created by

GOWSIKRAJA P

Used 131+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

int main() { unsigned int i=65000; while ( i++ != 0 ); printf("%d",i); return 0; }

PREDICT THE OUTPUT OR ERROR

1

2

3

SYNTAX ERROR

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h>

int main() {

short i;

for (i = 1; i >= 0; i++)

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

}

STATE THE OUTPUT

The control won’t fall into the for loop

Numbers will be displayed until the signed limit of short and throw a runtime error

Numbers will be displayed until the signed limit of short and program will successfully terminate

This program will get into an infinite loop and keep printing numbers with no errors

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

#include <stdio.h>

void main() {

int array[30], temp[30], i, j, k, l, num; //using 2 arrays

printf("Enter the number of lines to be printed: "); scanf("%d", &num);

temp[0] = 1;

array[0] = 1;

for (j = 0; j < num; j++)

printf(" "); printf(" 1\n");

for (i = 1; i < num; i++)

{ for (j = 0; j < i; j++)

printf(" ");

for (k = 1; k < num; k++)

{ array[k] = temp[k - 1] + temp[k];

} array[i] = 1; for (l = 0; l <= i; l++)

{ printf("%3d", array[l]);

temp[l] = array[l];

} printf("\n");

}

}

Enter the number of lines to be printed: 4

1

1 1

1 2 1

1 3 3 1

Enter the number of lines to be printed: 4

1

1 1

1 1 1

1 1 1 1

Enter the number of lines to be printed: 4

*

* *

* * *

* * * *

Enter the number of lines to be printed: 4

1

2 2

3 3 3

4 4 4 4

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

void main() { char a = 'a'; int x = (a % 10)++; printf("%d\n", x); }

GUESS THE OUTPUT

Grabage Value

Compiler Error

Output: 10

Output: 0

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h>

void main() {

int k = 0;

for (k < 3; k++)

printf("Hello");

}

Compile time error

Hello is printed thrice

Nothing

Varies

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h>

void main()

{

double k = 0;

for (k = 0.0; k < 3.0; k++)

printf("Hello");

}

Run time error

Hello is printed thrice

Hello is printed twice

Hello is printed infinitely

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h>

int main() {

int i = 0;

for (; ; ;)

printf("In for loop\n");

printf("After loop\n");

}

a) Compile time error

b) Infinite loop

c) After looP

d) Undefined behaviour

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