0% found this document useful (0 votes)
100 views

CS8261 - C Programming Laboratory - MCQ

The document contains a 15 question quiz about C programming fundamentals. It tests knowledge of topics like data types, operators, loops, pointers, and preprocessor directives. For each question, candidates must select the single best answer among four multiple choice options. The purpose of the quiz is to evaluate understanding of basic C programming concepts for a course at Tagore Engineering College.

Uploaded by

bsudheertec
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
100 views

CS8261 - C Programming Laboratory - MCQ

The document contains a 15 question quiz about C programming fundamentals. It tests knowledge of topics like data types, operators, loops, pointers, and preprocessor directives. For each question, candidates must select the single best answer among four multiple choice options. The purpose of the quiz is to evaluate understanding of basic C programming concepts for a course at Tagore Engineering College.

Uploaded by

bsudheertec
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

8/3/2021 CS8261 - C Programming Laboratory

CS8261 - C Programming Laboratory


SEMESTER/YEAR: II/I 0(12.30 pm -3.30pm) DATE : 30.07.2021

* Required

Email *

Your email

1. C is a ___ language *

High Level

Low Level

Middle Level

Machine Level

2. Which of the following symbol is used to denote a pre-processor statement? *

https://docs.google.com/forms/d/e/1FAIpQLSfLLJAsAFoBwf5kbBn105thm1LqaLuvWFHriNumpzB0rMQ3Ww/viewform 1/6
8/3/2021 CS8261 - C Programming Laboratory

3. Which of the following are tokens in C? *

Keywords

Variables

Constants

All of the above

4. Character constants should be enclosed between ___

Single quotes

Double quotes

Both a and b

None of these

5. The operator / can be applied to *

integer values

float values

double values

All of these

https://docs.google.com/forms/d/e/1FAIpQLSfLLJAsAFoBwf5kbBn105thm1LqaLuvWFHriNumpzB0rMQ3Ww/viewform 2/6
8/3/2021 CS8261 - C Programming Laboratory

6. The operator + in a+=4 means *

a=a+4

a+4=a

a=4

a=4+4

7. The printf() function retunes which value when an error occurs? *

Positive value

Zero

Negative value

None of these

8. What will this program print? main() { int i = 2; { int i = 4, j = 5; printf("%d %d", i,
j); } printf("%d %d", i, j); } *

a. 4525

b. 2525

c. 4545

d. None of the these

https://docs.google.com/forms/d/e/1FAIpQLSfLLJAsAFoBwf5kbBn105thm1LqaLuvWFHriNumpzB0rMQ3Ww/viewform 3/6
8/3/2021 CS8261 - C Programming Laboratory

9. What does this declaration mean? int x : 4; *

X is a four-digit integer

X cannot be greater than a four-digit integer.

X is a four-bit integer

None of the these

10. Why is a macro used in place of a function? *

It reduces execution time.

It reduces code size.

It increases execution time.

It increases code size.

11. How many times will the following loop execute? for(j = 1; j <= 10; j = j-1) *

Forever

Never

https://docs.google.com/forms/d/e/1FAIpQLSfLLJAsAFoBwf5kbBn105thm1LqaLuvWFHriNumpzB0rMQ3Ww/viewform 4/6
8/3/2021 CS8261 - C Programming Laboratory

12. Which one of the following is a loop construct that will always be executed
once? *

For

While

Switch

do while

13. Study the following statement #include <stdio.h> int main() { int *ptr, a = 10; ptr
= &a; *ptr += 1; printf("%d,%d/n", *ptr, a); } What will be the output? *

10, 10

10, 11

11, 10

11, 11

14. Which of the following statement is not true? *

A pointer to an int and a pointer to a double are of the same size.

A pointer must point to a data item on the heap (free store).

A pointer can be reassigned to point to another data item.

A pointer can point to an array.

https://docs.google.com/forms/d/e/1FAIpQLSfLLJAsAFoBwf5kbBn105thm1LqaLuvWFHriNumpzB0rMQ3Ww/viewform 5/6
8/3/2021 CS8261 - C Programming Laboratory

15. Which is valid expression in c language? *

int my_num = 100,000;

int my_num = 100000;

int my num = 1000;

int my num == 10000;

Send me a copy of my responses.

Submit

reCAPTCHA
Privacy Terms

This form was created inside of Tagore Engineering College. Report Abuse

 Forms

https://docs.google.com/forms/d/e/1FAIpQLSfLLJAsAFoBwf5kbBn105thm1LqaLuvWFHriNumpzB0rMQ3Ww/viewform 6/6

You might also like