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

Student Name Dineshlingam .M.U Subject Clanguage Admit Card No. Pass Exam. Date 2019-05-29 Marks Scored 51 / 60

The document contains details of a student's exam such as name, subject, admit card number, exam date, marks scored and answers to multiple choice questions. It lists 27 multiple choice questions about C language programming along with the student's answers and correct answers.

Uploaded by

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

Student Name Dineshlingam .M.U Subject Clanguage Admit Card No. Pass Exam. Date 2019-05-29 Marks Scored 51 / 60

The document contains details of a student's exam such as name, subject, admit card number, exam date, marks scored and answers to multiple choice questions. It lists 27 multiple choice questions about C language programming along with the student's answers and correct answers.

Uploaded by

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

Student Name DINESHLINGAM .M.

Subject CLANGUAGE Admit Card No. PASS

Exam. Date 2019-05-29 Marks Scored 51 / 60

1. Which of the following are unary operators in C?


Answered : D) All the above
Correct Answer is : D) All the above
______________________________________________________________________
2. Which keyword is used to come out of a loop only for that iteration?
Answered : B) continue
Correct Answer is : B) continue
______________________________________________________________________
3. Which of the following below is/are valid C keywords
Answered : B) int
Correct Answer is : B) int
______________________________________________________________________
4. Which of the following is not a valid C variable name?
Answered : D) int $main;
Correct Answer is : D) int $main;
______________________________________________________________________
5. Which is invalid name of identifier
Answered : C) test_name
Correct Answer is : C) test_name
______________________________________________________________________
6. What is the purpose of getc()
Answered : A) read a character from STDIN
Correct Answer is : A) read a character from STDIN
______________________________________________________________________
7. Which operator in c can't be overloaded
Answered : D) ?
Correct Answer is : C) ::
______________________________________________________________________
8. In which order do the following gets evaluated 1.Relational 2.Arithmetic 3.Logical 4.Assignment
Answered : C) 4321
Correct Answer is : A) 2134
______________________________________________________________________
9. Which of the following is the correct way of declaring a float pointer:
Answered : B) float *ptr;
Correct Answer is : B) float *ptr;
______________________________________________________________________
10. Continue statement used for
Answered : B) To stop the current iteration and begin the next iteration from the beginning
Correct Answer is : B) To stop the current iteration and begin the next iteration from the beginning
______________________________________________________________________
11. Array can be considered as set of elements stored in consecutive memory locations but having __________.
Answered : C)Same Data Type
Correct Answer is : C)Same Data Type
______________________________________________________________________
12. Literal means
Answered : A) a string
Correct Answer is : A) a string
______________________________________________________________________
13. Which of the following is not a valid C variable name?
Answered : D) int $main;
Correct Answer is : D) int $main;
______________________________________________________________________
14. Which is correct with respect to size of the datatypes?
Answered : C) char < int < double
Correct Answer is : C) char < int < double
______________________________________________________________________
15. Which header file should be included to use functions like malloc() and calloc()?
Answered : B) stdlib.h
Correct Answer is : B) stdlib.h
______________________________________________________________________
16. Which of the following is an invalid method for input?
Answered : C) scanf(?Three values are %d %d %d?,&a,&b,&c);
Correct Answer is : D) None of the mentioned
______________________________________________________________________
17. Which of the following correctly shows the hierarchy of arithmetic operations in C?
Answered : D) / * + -
Correct Answer is : D) / * + -
______________________________________________________________________
18. What is recursive function
Answered : A) a function call by main
Correct Answer is : B) a function call by itself
______________________________________________________________________
19. What is the header file for getch() function
Answered : (B) conio.h
Correct Answer is : (B) conio.h
______________________________________________________________________
20. scanf returns as its value
Answered : A) Number of successfully matched and assigned input items
Correct Answer is : A) Number of successfully matched and assigned input items
______________________________________________________________________
21. Size of void pointer is
Answered : B) 2 byte
Correct Answer is : B) 2 byte
______________________________________________________________________
22. total number of keywords in C are
Answered : B) 32
Correct Answer is : B) 32
______________________________________________________________________
23. What would be the output of the following program?#include"stdio.h"main(){int a, b=5;a=b+NULL;printf("%d", a);}
Answered : B) 5
Correct Answer is : B) 5
______________________________________________________________________
24. printf() belongs to which library of c
Answered : B) stdio.h
Correct Answer is : B) stdio.h
______________________________________________________________________
25. what is loop?
Answered : A) A set of statement execute in a function
Correct Answer is : C) Executes set of statement repeatedly util the condition become false
______________________________________________________________________
26. Which of the following cannot be a variable name in C?
Answered : A) volatile
Correct Answer is : A) volatile
______________________________________________________________________
27. Difference between structure and union is
Answered : C) The way memory is allocated
Correct Answer is : C) The way memory is allocated
______________________________________________________________________
28. Which statement is false when structure vs union
Answered : C) Need more memory to store structure, Need less memory for union
Correct Answer is : C) Need more memory to store structure, Need less memory for union
______________________________________________________________________
29. A pointer is
Answered : C) A variable that stores address of other variable
Correct Answer is : C) A variable that stores address of other variable
______________________________________________________________________
30. Which is not a storage class?
Answered : B) Struct
Correct Answer is : B) Struct
______________________________________________________________________
31. Any type of modification on the parameter inside the function will reflect in actual variable value can be related to
Answered : B) call by reference
Correct Answer is : B) call by reference
______________________________________________________________________
32. The keyword used to transfer control from a function back to the calling function is
Answered : D) return
Correct Answer is : D) return
______________________________________________________________________
33. The first expression in a for loop is
Answered : B) Value of the counter variable
Correct Answer is : B) Value of the counter variable
______________________________________________________________________
34. Which of the following is the correct usage of conditional operators used in C?
Answered : C) max = a>b ? a>c?a:c:b>c?b:c
Correct Answer is : C) max = a>b ? a>c?a:c:b>c?b:c
______________________________________________________________________
35. How to declare a variable to getting a string as input?
Answered : (D) char arr[10];
Correct Answer is : (D) char arr[10];
______________________________________________________________________
36. Which of the following special symbol allowed in a variable name?
Answered : D) _ (underscore)
Correct Answer is : D) _ (underscore)
______________________________________________________________________
37. What is an array?
Answered : B) Collection of similar data type
Correct Answer is : B) Collection of similar data type
______________________________________________________________________
38. What will be the output of the following arithmetic expression?5+3*2%10-8*6
Answered : A) -37
Correct Answer is : A) -37
______________________________________________________________________
39. What will be the output of the following program ?#include void main(){int a = 2;switch(a){case 1:
printf("goodbye"); break;case 2:continue;case 3:printf("bye");}}
Answered : A) error
Correct Answer is : A) error
______________________________________________________________________
40. The function that calls itself for its processing is known as.
Answered : D) Recursive Function
Correct Answer is : D) Recursive Function
______________________________________________________________________
41. Structures can be used
Answered : A) to hold different datatypes
Correct Answer is : D) all of above
______________________________________________________________________
42. The compiler in C ignores all text till the end of line using
Answered : A) //
Correct Answer is : A) //
______________________________________________________________________
43. Consider the following statements x= 5;y = x >3 ? 10 : 20;The value of y is
Answered : A) 10
Correct Answer is : A) 10
______________________________________________________________________
44. Set of consecutive memory locations is called as ________.
Answered : C)Array
Correct Answer is : C)Array
______________________________________________________________________
45. To access the members of structure which symbol is used
Answered : D) .
Correct Answer is : D) .
______________________________________________________________________
46. The operator used to get value at address stored in a pointer variable is
Answered : A) *
Correct Answer is : A) *
______________________________________________________________________
47. Which of the following cannot be checked in a switch-case statement?
Answered : C) Float
Correct Answer is : C) Float
______________________________________________________________________
48. Which bitwise operator is suitable for checking whether a particular bit is on or off?
Answered : B) & operator
Correct Answer is : B) & operator
______________________________________________________________________
49. How many times below for loop will be executed ? #include<stdio.h>int main(){ int i=0; for(;;) printf("%d",i);
return 0;}
Answered : C) 1 times
Correct Answer is : B) Infinite times
______________________________________________________________________
50. Which operator has the highest priority
Answered : A) ()
Correct Answer is : A) ()
______________________________________________________________________
51. What is prototype of a function in C
Answered : C) It is declaration of a function
Correct Answer is : C) It is declaration of a function
______________________________________________________________________
52. What is the purporse of using printf() function?
Answered : (C) To write the value
Correct Answer is : (C) To write the value
______________________________________________________________________
53. If we have declared an array described below -int arr[6];then which of the following array element is considered as
last array element ?
Answered : B)arr[5]
Correct Answer is : B)arr[5]
______________________________________________________________________
54. What among following is true about stack
Answered : A) stack cannot reuse its memory
Correct Answer is : C) all operation done at one end
______________________________________________________________________
55. which one of the following is correct definition for stringcopy using var2[10],var1[10]="language";?
Answered : B) strcpy(var2,var1);
Correct Answer is : B) strcpy(var2,var1);
______________________________________________________________________
56. What is the size of an int data type?
Answered : C) Depends on the system/compiler
Correct Answer is : C) Depends on the system/compiler
______________________________________________________________________
57. The variable that are declared outside all the functions are called ______.
Answered : B) Global variable
Correct Answer is : B) Global variable
______________________________________________________________________
58. What is correct order of precedence in C
Answered : D) Modulus, Multiplication, Substration
Correct Answer is : D) Modulus, Multiplication, Substration
______________________________________________________________________
59. Declaration,Instantiation with Initialization of a array variabale with 5 elements of type char
Answered : A) char x[30]={'a','b','c','d','e'};
Correct Answer is : A) char x[30]={'a','b','c','d','e'};
______________________________________________________________________
60. What are the two types of functions in C?
Answered : (D) User defined function,Build in function
Correct Answer is : (D) User defined function,Build in function
______________________________________________________________________

You might also like