0% found this document useful (0 votes)
24 views5 pages

PPS Quiz 2 - Google Forms

document

Uploaded by

sharanpreet20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views5 pages

PPS Quiz 2 - Google Forms

document

Uploaded by

sharanpreet20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

6/5/24, 10:27 AM PPS Quiz 2

PPS Quiz 2
* Indicates required question

1. Roll No *

2. Name *

3. Section *

Mark only one oval.

Sec B

Sec G

4. What is the output of the following program? * 1 point

#include main()
{
int a[3] = {2,1};
printf("%d", a[a[1]]);

Mark only one oval.

https://docs.google.com/forms/d/1O1kYUiCTmhRDxNpmGFKRQpGGq3jsxt56f1khjrBRaFI/edit 1/5
6/5/24, 10:27 AM PPS Quiz 2

5. What is the output of the following program? * 1 point


#include "stdio.h"
int main()
{
int x, y = 5,
z = 5;
x = y == z;
printf("%d", x);
getchar();
return 0;
}

Mark only one oval.

Compile Error

6. What is the output of the following program? 1 point


#include <stdio.h>
int main()
{
int i = 1, 2, 3;
printf("%d", i);
return 0;
}

Mark only one oval.

Garbage Value

Compile time error

https://docs.google.com/forms/d/1O1kYUiCTmhRDxNpmGFKRQpGGq3jsxt56f1khjrBRaFI/edit 2/5
6/5/24, 10:27 AM PPS Quiz 2

7. How many times the given below program will print "India"? * 1 point

#include<stdio.h>
int main ()
{
int x;
for(x=-1; x<=20; x++)
int i;
{
if(x < 10)
continue;
else
break;
printf("India");
}

Mark only one oval.

Infinite

21 times

0 times

20 times

8. What is the output of following program? * 1 point

#include <stdio.h>
int main()
{
int i = 5;
printf("%d %d %d", i++, i++, i++);
return 0;
}

Mark only one oval.

765

567

777

Compiler Dependent

https://docs.google.com/forms/d/1O1kYUiCTmhRDxNpmGFKRQpGGq3jsxt56f1khjrBRaFI/edit 3/5
6/5/24, 10:27 AM PPS Quiz 2

9. In C, sizes of an integer and a pointer must be same. * 1 point

Mark only one oval.

True

False

10. What is #include <stdio.h>? * 1 point

Mark only one oval.

Preprocessor directive

Inclusion directive

File inclusion directive

None of the mentioned

11. What is an example of iteration in C? * 1 point

Mark only one oval.

for

while

do-while

all of the mentioned

12. scanf() is a predefined function in______header file. * 1 point

Mark only one oval.

stdlib. h

ctype. h

stdio. h

stdarg. h

https://docs.google.com/forms/d/1O1kYUiCTmhRDxNpmGFKRQpGGq3jsxt56f1khjrBRaFI/edit 4/5
6/5/24, 10:27 AM PPS Quiz 2

13. What are the elements present in the array of the following C code? * 1 point

int array[5] = {5};

Mark only one oval.

5, 5, 5, 5, 5

5, 0, 0, 0, 0

5, (garbage), (garbage), (garbage), (garbage)

(garbage), (garbage), (garbage), (garbage), 5

This content is neither created nor endorsed by Google.

Forms

https://docs.google.com/forms/d/1O1kYUiCTmhRDxNpmGFKRQpGGq3jsxt56f1khjrBRaFI/edit 5/5

You might also like