0% found this document useful (0 votes)
9 views54 pages

C Language

The document contains multiple-choice questions (MCQs) related to C programming, covering topics such as functions, loops, data types, and operators. Each question provides options for answers, aimed at testing knowledge of the C language. The document also encourages viewers to like and subscribe to the YouTube channel 'Lecture by Vikas Kumar' for more educational content.

Uploaded by

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

C Language

The document contains multiple-choice questions (MCQs) related to C programming, covering topics such as functions, loops, data types, and operators. Each question provides options for answers, aimed at testing knowledge of the C language. The document also encourages viewers to like and subscribe to the YouTube channel 'Lecture by Vikas Kumar' for more educational content.

Uploaded by

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

Channel Name: Lecture by Vikas Kumar

Chapter : MCQ on C-Language

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

1.What is scanf() in c programming?


A.The layout of an input string
B.Array
C.Output function
D.All of the above

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

1.What is scanf() in c programming?


A.The layout of an input string
B.Array
C.Output function
D.All of the above

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

2. Which of the following is not related to c


programming?
A.conio.h
B.getch()
C.console.log
D.All of the above

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

3. What is a while loop?


A.Repeats the loop if the condition applies true
B.Processes the code at least once and then repeats
C.Repeats only once
D.All of the above

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

4. What does a do-while loop do?


A.Repeats the process infinitely
B.Processes the code at least once and then repeats
C.Repeats only once
D.All of the above

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

5. What are strings in C programming?


A.Individual variables
B.Group of function
C.Group of character type variables in array form
D.All of the above

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

6. What is the use of print f in c


programming?
A.Helps in the printing of a string on the output
screen
B.Processes the variables in a program
C.Is a variable type
D.All of the above

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

7. C is _______ type of programming


language.?
A) Object Oriented
B) Procedural
C) Bit level language
D) Functional

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

8. What is the present C Language Standard.?


A) C99 ISO/IEC 9899:1999
B) C11 ISO/IEC 9899:2011
C) C05 ISO/IEC 9899:2005
D) C10 ISO/IEC 9899:2010

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

9. Correct way of commenting a single line


is.?
A) /*printf("Hello C.."); printf("How are you.");
B) //printf("Hello C.."); printf("How are you.");
C) /*printf("Hello C.."); printf("How are you.");*/
D) /printf("Hello C..");/ printf("How are you.");

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

10. Single Line Comment // is also called.?


A) C++ Style Comment
B) Java Style Comment
C) PHP Style Comment
D) All the above

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

11. What is the output of the C statement.?


int main()
{
int a=0;
a = 4 + 4/2*5 + 20;
printf("%d", a);
return 0;
}
A) 40
B) 4
C) 34
D) 54
Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

12. What is the output of the C Program.? int main()


{
int a=0;
a = 10 + 5 * 2 * 8 / 2 + 4;
printf("%d", a);
return 0;
}
A) 124
B) 54
C) 23
D) 404
Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

13. What is the output of the C Program.? int main()


{
float a=10.0;
a = a % 3;
printf("%f", a);
return 0;
}
A) 0
B) 1
C) 1.000000
D) Compiler error.
Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language
14. What is output of below program?
int main()
{
int i;
for(i=0; i<5; i++);
{
printf("cppbuzz");
}

return 0;
}

(A) cppbuzz is printed 5 times


(B) Compilation Error
( C) cppbuzz is printed 1 times
(D) Nothing is printed
Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

15. Library function getch() belongs to which


header file?
(A) stdio.h
(B) conio.h
(C) stdlib.h
(D) stdlibio.h

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

16.What is the other name for C Language ?:


Question Mark Colon Operator.?
A) Comparison Operator
B) If-Else Operator
C) Binary Operator
D) Ternary Operator

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

17. Choose a syntax for C Ternary Operator


from the list.
A) condition ? expression1 : expression2
B) condition : expression1 ? expression2
C) condition ? expression1 < expression2
D) condition < expression1 ? expression2

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

18. Choose a correct statement regarding C


Comparison Operators.
A) (x == y) Is x really equal to y. (x != y) Is x not
equal to y.
B) (x < y) Is x less than y (x > y) Is x greater than y
C) (x <= y) Is x less than or equal to y. (x >= y) Is x
greater than or equal to y
D) All the above
Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

19. Choose a right C Statement.


A) Loops or Repetition block executes a group of
statements repeatedly.
B) Loop is usually executed as long as a condition is
met.
C) Loops usually take advantage of Loop Counter
D) All the above.

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

20. Loops in C Language are implemented


using.?
A) While Block
B) For Block
C) Do While Block
D) All the above

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

21. The address of a variable can be obtained


using _____ operator.
(A) *
(B) &
(C) ?
(D) ;

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

22. What are the application of Structures ?


a) changing the size of cursor
b) hiding file from the directory
c) formatting a floppy
d) All of the above

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

23. C has ____________ keywords:


A.30
B.31
C.32
D.33

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

24. Set of consecutive memory locations is called as


________.
[A] Loop
[B] Function
[C] Pointer
[D] Array

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

25. Array can be considered as set of elements


stored in consecutive memory locations but having
__________.
[A] Same Data Type
[B] None of these
[C] Different Data Type
[D] Same Scope

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

26. Smallest element of an array is called as


_______.
[A] Middle Bound
[B] Lower Bound
[C] Range
[D] Upper Bound

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

27. If we have declared an array described below –


int arr[6];
then which of the following array element is
considered as last array element ?
[A] arr[0]
[B] arr[4]
[C] arr[5]
[D] arr[6]
Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

28. Array which is having ____ dimensions is called


as 2-D array.
[A] 2
[B] 5
[C] 3
[D] 4

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

29. Array is ______ data type in C Programming


language.
[A] None of these
[B] Derived Data Type
[C] Primitive Data Type
[D] Custom Data Type

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

30. If you pass an array as an argument to a


function, what actually gets passed?
[A] Address of the last element of array
[B] Base address of the array
[C] Value of elements in array
[D] First element of the array

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

30. What is meaning of following declaration ?


int arr[20];
[A] None of these
[B] Array of size 20 that can have integer address
[C] Integer Array of size 20
[D] Array of Size 20

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

31. int a[20]What will be the size of above array


element ?
[A] 22
[B] 20
[C] 21
[D] 19

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

32. What is meaning of the following statement ?


int *ptr[20]
[A] Array of Integer Pointers of size 20
[B] Integer Array to Integer Pointers having size 20
[C] None of these
[D] Integer Array of size 20 pointing to an Integer
Pointer

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

33. Below is an example of -int RollNum[30][4];


[A] 4-D Array
[B] 1-D Array
[C] 2-D Array
[D] 3-D Array

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

34. Pointer is special kind of variable which is used


to stored __________ of the variable.
[A] Address
[B] Variable Name
[C] Data Type
[D] Value

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

35. Address stored in the pointer variable is of type


__________.
[A] Floating
[B] Integer
[C] Array
[D] Character

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

36. In order to fetch the address of the variable we


write preceding _________ sign before variable name.
[A] Percent
[B] Ampersand
[C] Asteriks
[D] Comma

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

37. A program contains the following code:


main()
{
printf("\\nab");
printf("\\bcd");
printf("\\ref");
}
Here, the result of the above program is -----?
A.abcdef
B.efacd
C.acdef
D.efd
Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

38. Which of the following is a keyword used for a


storage class?
A] Printf
B] external
C] auto
D] scanf

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

39. Preprocessor Directives are used for -


A] Macro Expansion
B] File Inclusion
C] Conditional Compilation
D] All of these

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

40. Which operator has the lowest priority ?


A] ++
B] %
C] +
D] ||

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

41. Which pair of functions below are used for


single character I/O ?
A] getchar() and putchar()
B] scanf() and printf()
C] input() and output()
D] Non of these

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

42. What is the output of this program ?


void main()
{
int a=b=c=10;
a=b=c=50;
printf(“\n%d %d %d”,a,b,c);
}

A] 50 50 50
B. Compile Time Error
C. 10 10 10
D. Three Gaebage Value
Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

43. Which of the following is not s keyword of ‘C’ ?


A]auto
B]register
C]int
D]function

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

44. What is sizeof In ‘C’ ?


A] Operator
B] Reserve Worf
C] Both (A) and (B)
D] Function

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

45. Which is not keyword in ‘C’ ?


A]typedef
B] const
C] near
D] complex

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

46. int **x;


A]x is a pointer to pointer
B] x is not pointer
C] x is long
D] None of these

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

47. What will be the output ?


void main ( )
{
printf(“\n %d %d”, 10&20, 10/ 20);
}

A] 00
B] 10 10
C] 0 30
D] 20 20
Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

48. Which of the following is used as a string


termination character ?
A] 0
B] \0
C] /0
D] None of these

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

49. The << operator is used for


A) Right shifting
B) Left shifting
C) Bitwise shifting
D) Bitwise complement

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

50. Which escape character can be used to begin a


new line in C ……..
A) a
B) m
C) b
D) n

Please Like and subscribe my you Tube channel Lecture by vikas kumar
Channel Name: Lecture by Vikas Kumar
Chapter : MCQ on C-Language

Thanku

Please Like and subscribe my you Tube channel Lecture by vikas kumar

You might also like