18CSS101J-PPS CT3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

8/2/2021 18CSS101J-PPS CT3

18CSS101J-PPS CT3
* Required

PART C

In which header file is the NULL macro defined? *

stdio.h

stddef.h

stdio.h and stddef.h

math.h

https://docs.google.com/forms/d/e/1FAIpQLSch2jhVGwS7uK4mCsqHUzsQzNyzaqQ_Xq6n2pVe_rUUdqWa8Q/formResponse 1/13
8/2/2021 18CSS101J-PPS CT3

Find the correct output of the following code. *

x = 0 *ptr = 0 x = 5 *ptr = 5 x = 6 *ptr = 6

x = garbage value *ptr = 0 x = garbage value *ptr = 5 x = garbage value *ptr = 6

x = 0 *ptr = 0 x = 5 *ptr = 5 x = garbage value *ptr = garbage value

x = 0 *ptr = 0 x = 0 *ptr = 0 x = 0 *ptr = 0

https://docs.google.com/forms/d/e/1FAIpQLSch2jhVGwS7uK4mCsqHUzsQzNyzaqQ_Xq6n2pVe_rUUdqWa8Q/formResponse 2/13
8/2/2021 18CSS101J-PPS CT3

Select the correct output of the following code. *

Compiler error

10

Garbage Value

https://docs.google.com/forms/d/e/1FAIpQLSch2jhVGwS7uK4mCsqHUzsQzNyzaqQ_Xq6n2pVe_rUUdqWa8Q/formResponse 3/13
8/2/2021 18CSS101J-PPS CT3

Which of the following is true? *

“ptr = calloc(m, n)” is equivalent to following ptr = malloc(m * n);

“ptr = calloc(m, n)” is equivalent to following ptr = malloc(m * n); memset(ptr, 0, m *


n);

“ptr = calloc(m, n)” is equivalent to following ptr = malloc(m); memset(ptr, 0, m);

“ptr = calloc(m, n)” is equivalent to following ptr = malloc(n); memset(ptr, 0, n);

Find the correct Answer of the following code *

alan alan alan turing

alan alan turing turing

alan turing alan turing

run time error

https://docs.google.com/forms/d/e/1FAIpQLSch2jhVGwS7uK4mCsqHUzsQzNyzaqQ_Xq6n2pVe_rUUdqWa8Q/formResponse 4/13
8/2/2021 18CSS101J-PPS CT3

Which of the following operation is illegal in structures? *

Typecasting of structure

Pointer to a variable of the same structure

Dynamic allocation of memory for structure

Array of Structures

Every C Program should contain which function *

printf()

show()

scanf()

main()

https://docs.google.com/forms/d/e/1FAIpQLSch2jhVGwS7uK4mCsqHUzsQzNyzaqQ_Xq6n2pVe_rUUdqWa8Q/formResponse 5/13
8/2/2021 18CSS101J-PPS CT3

Which one is the correct output find? *

15

12

10

11

https://docs.google.com/forms/d/e/1FAIpQLSch2jhVGwS7uK4mCsqHUzsQzNyzaqQ_Xq6n2pVe_rUUdqWa8Q/formResponse 6/13
8/2/2021 18CSS101J-PPS CT3

What is the output of C program with recursive, when it is called sum(4)? *

10

11

12

15

https://docs.google.com/forms/d/e/1FAIpQLSch2jhVGwS7uK4mCsqHUzsQzNyzaqQ_Xq6n2pVe_rUUdqWa8Q/formResponse 7/13
8/2/2021 18CSS101J-PPS CT3

What is the output of this C code? *

Compile time error

Nothing

hello

Varies

https://docs.google.com/forms/d/e/1FAIpQLSch2jhVGwS7uK4mCsqHUzsQzNyzaqQ_Xq6n2pVe_rUUdqWa8Q/formResponse 8/13
8/2/2021 18CSS101J-PPS CT3

Find the output of the following C code? *

cppbuzz7

7cppbuzz

cppbuzz8

8cppbuzz

https://docs.google.com/forms/d/e/1FAIpQLSch2jhVGwS7uK4mCsqHUzsQzNyzaqQ_Xq6n2pVe_rUUdqWa8Q/formResponse 9/13
8/2/2021 18CSS101J-PPS CT3

What is the output of this program? *

Maths 100

Science 85

Science 90

Science 100

https://docs.google.com/forms/d/e/1FAIpQLSch2jhVGwS7uK4mCsqHUzsQzNyzaqQ_Xq6n2pVe_rUUdqWa8Q/formResponse 10/13
8/2/2021 18CSS101J-PPS CT3

Find the Output of the following code *

sizeof(i) = 1

sizeof(i) = 2

sizeof(i) = 4

Compilation error

https://docs.google.com/forms/d/e/1FAIpQLSch2jhVGwS7uK4mCsqHUzsQzNyzaqQ_Xq6n2pVe_rUUdqWa8Q/formResponse 11/13
8/2/2021 18CSS101J-PPS CT3

Find the output of this Code? *

Compile time error

Nothing

Junk values

st st

https://docs.google.com/forms/d/e/1FAIpQLSch2jhVGwS7uK4mCsqHUzsQzNyzaqQ_Xq6n2pVe_rUUdqWa8Q/formResponse 12/13
8/2/2021 18CSS101J-PPS CT3

What is the output of this C code? *

123450

1 2 3 4 5 junk

123455

Run time error

Back Submit

Never submit passwords through Google Forms.

This form was created inside of SRM Institute of Science and Technology. Report Abuse

 Forms

https://docs.google.com/forms/d/e/1FAIpQLSch2jhVGwS7uK4mCsqHUzsQzNyzaqQ_Xq6n2pVe_rUUdqWa8Q/formResponse 13/13

You might also like