0% found this document useful (0 votes)
142 views13 pages

18CSS101J-PPS CT3

The document contains a quiz with multiple choice and code output questions related to the C programming language. It covers topics like header files, memory allocation, structures, functions, operators, data types and more. The participant is asked to select the correct answer or output for each code snippet from the given options.

Uploaded by

Shreyas Kumar
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)
142 views13 pages

18CSS101J-PPS CT3

The document contains a quiz with multiple choice and code output questions related to the C programming language. It covers topics like header files, memory allocation, structures, functions, operators, data types and more. The participant is asked to select the correct answer or output for each code snippet from the given options.

Uploaded by

Shreyas Kumar
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/ 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

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy