SlideShare a Scribd company logo
1 of 9
Download to read offline
R.Amutha
Assistant Professor, PSGCAS
1. Who is father of C Language?
A) Bjarne Stroustrup B) James A. Gosling C) Dennis Ritchie D) Dr. E.F.
Codd
2. C Language developed at ----------------------
A) AT & T's Bell Laboratories of USA in 1970 B) Sun Microsystems in 1973
C) Cambridge University in 1972 D) None
3. C Programs are converted into machine language with the help of -------------------
A) An Editor B) A Compiler C) An Operating System D) None
4. Which one of the following is not a reserved word in C?
A) auto B) case C) main D) int
5. Which one of the following is not a valid identifier?
A)_Studentid B) 1studentid C) Studentid D) studentid1
6. Which of the following is NOT correct in C variable type?
A) float B) real C)int d)double
7. An array elements are always stored in ----------------- memory locations.
A) Sequential B) Random C)Sequnetial & Random D)None
8. What will be printed after execution of the following code?
void main()
{
int arr[15]={1,2,3,4,5};
Printf(“%d”,arr[5]);
}
A) Garbage Value B) 0 C) 6 D) 5
9. What is the output of following code?
#include <stdio.h>
int main()
{
int i = -3;
int k = i % 2;
R.Amutha
Assistant Professor, PSGCAS
printf("%dn", k);
}
A) Compile time error B) 1 C) -1 d) 0
10. What will be the final value of x in the following C code?
#include <stdio.h>
void main()
{
int x = 5 * 9 / 3 + 9;
}
A) 24 B) 2 c) 4 D)Depends on compiler
11. A C variable cannot start with
A) A number B) A special symbol other than underscore C) Both A &B
D) None
12. What is the output of this C code?
void main()
{
int y = 3;
int x = 7 % 4 * 3 / 2;
printf("Value of x is %d", x);
}
A) 1 B) 4 C)0 D)3
13. The precedence of arithmetic operators is (from highest to lowest)?
A) %, *, /, +, - B) B. %, +, /, *, - C) C. +, -, %, *, / D) %, +, -, *, /
14. Which of the following is not an arithmetic operation?
A. a *= 20; B) B. a /= 30; C) C. a %= 40; D) a != 50;
15. A single line comment in C language source code can begin with-------------------
A) - B)-: C)/* D)//
16. How many main () function we can have in our program?
A) 1 (B) 2 (C) No Limit (D) Depends on Compiler
R.Amutha
Assistant Professor, PSGCAS
17. Which of the following is executed by Preprocess?
A) #include<stdio.h> B) return 0 (C) void main(int argc , char ** argv)
(D) None of above
18. What is the output of this C code?
void main()
{
int var = 010;
printf("%d", var);
}
A)2 B)8 C)9 D)10
19. Which of the following statements is true for variable names in C?
A) They can contain alphanumeric characters as well as special characters.
B) It is not an error to declare a variable to be one of the keywords.
C) Variable name cannot start with a digit.
D) Variable can be of any length.
20. The format identifier ‘%i’ is also used for------------data type.
A) char B)int C)float D)double
21.All Keywords in c are in-------------------
A) Lower case B)Uppercase C)Camelcase D)none
22.What will be the output of the following C Code?
#include<stdio.h>
int main()
{
j=10;
printf(“%dn”,j);;
return 0;
}
A) 10 B)11 C)Compile time error D)0
23. --------------- library function used to round up the given float value into next integer value.
A) Ceil() B) abs() c) floor() d) fabs()
R.Amutha
Assistant Professor, PSGCAS
24.A/An -------------------------- is an identifier that refers to a collection of data items that all
have the same name.
A) Variable B) Constant C) Array D) None
25. Which among the following is NOT a logical or relational operator?
A) != B) = = C) || D)=
26. Maximum value of unsigned integer is -----------------
A) 65535 B)32767 C)-32767 D)-65535
27. Which of the following language is predecessor to ‘C’ Programming language?
A) A B) B C) ADA D) C++
28. In the passage of text, individual words and punctuation marks are known as
A) Constants B) Operators C) Keywords D) Tokens
29. What is C Tokens?
A) The smallest individual units of c program B) The basic element recognized by the
compiler C) The largest individual units of program D) A & B Both
30. Each statement in a C program should end with ------------------
A) Semicolon ; B) Colon : C) Period . (dot symbol) D) None
31. Which of the following function compares 2 strings with case-insensitively?
A)strcmp(s, t) B)strcmpcase(s, t) C)strcasecmp(s, t) D) strchr(s, t)
32. Which among the following is odd one out?
A) printf B) fprintf C) putchar D) scanf
33. Escape sequence are prefixed with
A)% B) C)” D);
34. What is the output of this C code?
#include
void main()
{
char c = 'd';
putchar(c);
}
A) Compile time error B) d C) Undefined behaviour D)None
R.Amutha
Assistant Professor, PSGCAS
35. What is the purpose of sprintf?
A) It prints the data into stdout B) It writes the formatted data into a string
C) It writes the formatted data into a file D) Both A & C
36. What will be the output of the following C code?
#include <stdio.h>
void main()
{
int const k = 5;
k++;
printf("k is %d", k);
}
A) k is 6 B) Error due to const succeeding int
C) Error, because a constant variable can be changed only twice
D) Error, because a constant variable cannot be changed
37. --------------is a conversion character used to display data item assigned decimal integer.
A) i B)f C)d D)U
38. To print out a and b given below, which of the following printf() statement will you use?
#include<stdio.h>
void main()
{
float a=3.14;
double b=3.16
}
A) printf("%f %lf", a, b); B) printf("%Lf %f", a, b);
C) printf("%Lf %Lf", a, b); D) printf("%f %Lf", a, b);
39. Data type of the controlling statement of a switch statement cannot be of the type
A) int B)char C) short D)float
40. How long the following loop runs?
for (x=0;x=3;x++)
A) Three times B) Four times C) Forever D) never
41. A switch statement is used to
A) To use switching variable
B) switch between function in a program char
R.Amutha
Assistant Professor, PSGCAS
C) Switch from one variable to another variable
D) Too choose from multiple possibilities which may arise due to different values of single
variable.
42. A labled statement consist of an identifier followed by a
A): B); C). D),
43. How many times the loop will be executed for the following?
for(digit=0;digit <9;digit++)
{
digit=2*digit;
digit--;
}
A) Infinite B)9 C)0 D)None
44. The continue statement cannot be used with
A) for B) while C) do while D) switch
45. Switch statement accepts.
A) int B) char C) long D) All of the above
46. Which loop is guaranteed to execute at least one time.
A) for B) while C) do while D)None
47. What is the output of this program?
#include <stdio.h>
void main()
{
int a=10;
if(a=5)
printf("YES");
else
printf("NO");
}
A) YES B) NO C) Error D)YESNO
48. Type of statement written in sequence and is repeated until specific condition met is
classified as-----
A) format B) loop C) case D) condition
R.Amutha
Assistant Professor, PSGCAS
49. --------- function reads character from keyboard.
A) getchar() B)getc() C)putc() D)putchar()
50. ---------- function closes an opened file.
A) fclose() B)getw() C)eof() D)feof()
51. The value of EOF is--------------
A) 0 B) -1 C) 1 D)10
52. Abbreviate ASCII with regard to C Language.
A) Australian Standard Code for Information Interchange
B) American Standard Code for Information Interchange
C) American Symbolic Code for Information Interchange
D) Australian Symbolic Code for Information Interchange
53. The ------------- statement ends the loop immediately when it is encountered.
A) break B) continue C) goto D) if
54. The ---------- statement skips the current iteration of the loop and continues with the next
iteration.
A) break B) continue C) goto D) if
55. Label in Goto statement is same like
A) Case in switch statement B) Initialization in for loop
C) Continuation condition in for loop D) All of them
56. What is the final value of x when the code int x; for(x=0; x<10; x++) {} is run?
A) 1 B) 9 C) 0 D) 10
57. How many times is a do while loop guaranteed to loop?
A) 0 B) Infinitely C) 1 D) Variable
58. Choose the correct statements
A) Array stores data of the same type B) Array can be a part of a structure
C) Array of structure is allowed D) All of the above
59. What is the output of the following?
#include <stdio.h>
void main()
{
R.Amutha
Assistant Professor, PSGCAS
int x=22;
if(x=10)
printf("TRUE");
else
printf("FALSE");
}
A) TRUE B) FALSE C) Compile Error D) Runtime error
59. Find the output of the following
#include<stdio.h>
int main()
{
int a=10;
if (a==10)
{
printf(“Hello…”);
break;
printf(“OK”);
}
Else
{
printf(“Hii”);
}
return 0;
A) Hello B) Hello…OK C) OK D) Error
61. Find the output of following
#include<stdio.h>
void main()
{
int ok=-100;
-100;
Printf(“%d”,ok);
}
A) 100 B) Error C) -100 d)0
R.Amutha
Assistant Professor, PSGCAS
Answers:
1. C 2. A 3. B 4. C 5. B
6. B 7. A 8. B 9. C 10. A
11. C 12. B 13. A 14.D 15. D
16. A 17. A 18. B 19. C 20. A
21. A 22. C 23. A 24. C 25. D
26. A 27. B 28. D 29. A 30. A
31. A 32. D 33. B 34.B 35.B
36.D 37. C 38. A 39.D 40.C
41.D 42.A 43.A 44.D 45.D
46.C 47.A 48.B 49.A 50.A
51.B 52.B 53.A 54.C 55.A
56.D 57.C 58.D 59.A 60.D
61.C

More Related Content

What's hot

The solution manual of c by robin
The solution manual of c by robinThe solution manual of c by robin
The solution manual of c by robinAbdullah Al Naser
 
Core programming in c
Core programming in cCore programming in c
Core programming in cRahul Pandit
 
Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...
Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...
Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...Kuntal Bhowmick
 
Hm system programming class 1
Hm system programming class 1Hm system programming class 1
Hm system programming class 1Hitesh Mohapatra
 
Let us c (by yashvant kanetkar) chapter 1 solution
Let us c (by yashvant kanetkar) chapter 1 solutionLet us c (by yashvant kanetkar) chapter 1 solution
Let us c (by yashvant kanetkar) chapter 1 solutionHazrat Bilal
 
LET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERSLET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERSKavyaSharma65
 
Test 1 Faktöriyel
Test 1 FaktöriyelTest 1 Faktöriyel
Test 1 Faktöriyelsorucanavari
 
Data Structures Using C Practical File
Data Structures Using C Practical File Data Structures Using C Practical File
Data Structures Using C Practical File Rahul Chugh
 
Analysis and Design of Algorithms
Analysis and Design of AlgorithmsAnalysis and Design of Algorithms
Analysis and Design of AlgorithmsBulbul Agrawal
 
How to execute a C program
How to execute a C  program How to execute a C  program
How to execute a C program Leela Koneru
 
Constant and variacles in c
Constant   and variacles in cConstant   and variacles in c
Constant and variacles in cyash patel
 
Regular Expression Examples.pptx
Regular Expression Examples.pptxRegular Expression Examples.pptx
Regular Expression Examples.pptxGhulamRabani9
 
PPS Arrays Matrix operations
PPS Arrays Matrix operationsPPS Arrays Matrix operations
PPS Arrays Matrix operationsSreedhar Chowdam
 

What's hot (20)

The solution manual of c by robin
The solution manual of c by robinThe solution manual of c by robin
The solution manual of c by robin
 
Core programming in c
Core programming in cCore programming in c
Core programming in c
 
Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...
Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...
Multiple Choice Questions on JAVA (object oriented programming) bank 2 -- bas...
 
Hm system programming class 1
Hm system programming class 1Hm system programming class 1
Hm system programming class 1
 
Let us c (by yashvant kanetkar) chapter 1 solution
Let us c (by yashvant kanetkar) chapter 1 solutionLet us c (by yashvant kanetkar) chapter 1 solution
Let us c (by yashvant kanetkar) chapter 1 solution
 
Adv. python regular expression by Rj
Adv. python regular expression by RjAdv. python regular expression by Rj
Adv. python regular expression by Rj
 
LET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERSLET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERS
 
C Programming
C ProgrammingC Programming
C Programming
 
Test 1 Faktöriyel
Test 1 FaktöriyelTest 1 Faktöriyel
Test 1 Faktöriyel
 
Data Structures Using C Practical File
Data Structures Using C Practical File Data Structures Using C Practical File
Data Structures Using C Practical File
 
Daa unit 1
Daa unit 1Daa unit 1
Daa unit 1
 
Analysis and Design of Algorithms
Analysis and Design of AlgorithmsAnalysis and Design of Algorithms
Analysis and Design of Algorithms
 
How to execute a C program
How to execute a C  program How to execute a C  program
How to execute a C program
 
PART - 1 Cpp programming Solved MCQ
PART - 1 Cpp programming Solved MCQPART - 1 Cpp programming Solved MCQ
PART - 1 Cpp programming Solved MCQ
 
computer quiz
computer quizcomputer quiz
computer quiz
 
Constant and variacles in c
Constant   and variacles in cConstant   and variacles in c
Constant and variacles in c
 
Regular Expression Examples.pptx
Regular Expression Examples.pptxRegular Expression Examples.pptx
Regular Expression Examples.pptx
 
Function C programming
Function C programmingFunction C programming
Function C programming
 
Theory of computation Lec1
Theory of computation Lec1Theory of computation Lec1
Theory of computation Lec1
 
PPS Arrays Matrix operations
PPS Arrays Matrix operationsPPS Arrays Matrix operations
PPS Arrays Matrix operations
 

Similar to C MCQ

Data structures and algorithms unit i
Data structures and algorithms unit iData structures and algorithms unit i
Data structures and algorithms unit isonalisraisoni
 
Model question paper_mc0061
Model question paper_mc0061Model question paper_mc0061
Model question paper_mc0061gurbaxrawat
 
ExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docxExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docxgitagrimston
 
(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2Pamidimukkala Sivani
 
this pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming studentsthis pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming studentspavan81088
 
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdfLDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdfVedant Gavhane
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2Knowledge Center Computer
 
C aptitude 1st jan 2012
C aptitude 1st jan 2012C aptitude 1st jan 2012
C aptitude 1st jan 2012Kishor Parkhe
 
Computer programming mcqs
Computer programming mcqsComputer programming mcqs
Computer programming mcqssaadkhan672
 
important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomeshpraveensomesh
 
CAPE Computer Science Unit 1 Paper 1 - Practice Paper
CAPE Computer Science Unit 1 Paper 1 - Practice PaperCAPE Computer Science Unit 1 Paper 1 - Practice Paper
CAPE Computer Science Unit 1 Paper 1 - Practice PaperAlex Stewart
 
C __paper.docx_final
C __paper.docx_finalC __paper.docx_final
C __paper.docx_finalSumit Sar
 
Technical aptitude test 2 CSE
Technical aptitude test 2 CSETechnical aptitude test 2 CSE
Technical aptitude test 2 CSESujata Regoti
 

Similar to C MCQ (20)

Technical questions
Technical questionsTechnical questions
Technical questions
 
Data structures and algorithms unit i
Data structures and algorithms unit iData structures and algorithms unit i
Data structures and algorithms unit i
 
Model question paper_mc0061
Model question paper_mc0061Model question paper_mc0061
Model question paper_mc0061
 
ExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docxExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docx
 
(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2
 
this pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming studentsthis pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming students
 
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdfLDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
 
Part - 3 Cpp programming Solved MCQ
Part - 3 Cpp programming Solved MCQ  Part - 3 Cpp programming Solved MCQ
Part - 3 Cpp programming Solved MCQ
 
Revision1 C programming
Revision1 C programmingRevision1 C programming
Revision1 C programming
 
C aptitude 1st jan 2012
C aptitude 1st jan 2012C aptitude 1st jan 2012
C aptitude 1st jan 2012
 
Computer programming mcqs
Computer programming mcqsComputer programming mcqs
Computer programming mcqs
 
important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomesh
 
CAPE Computer Science Unit 1 Paper 1 - Practice Paper
CAPE Computer Science Unit 1 Paper 1 - Practice PaperCAPE Computer Science Unit 1 Paper 1 - Practice Paper
CAPE Computer Science Unit 1 Paper 1 - Practice Paper
 
Soln dc05
Soln dc05Soln dc05
Soln dc05
 
C Programming
C ProgrammingC Programming
C Programming
 
Revision1schema C programming
Revision1schema C programmingRevision1schema C programming
Revision1schema C programming
 
Exam for c
Exam for cExam for c
Exam for c
 
C __paper.docx_final
C __paper.docx_finalC __paper.docx_final
C __paper.docx_final
 
Technical aptitude test 2 CSE
Technical aptitude test 2 CSETechnical aptitude test 2 CSE
Technical aptitude test 2 CSE
 

Recently uploaded

MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 

Recently uploaded (20)

MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 

C MCQ

  • 1. R.Amutha Assistant Professor, PSGCAS 1. Who is father of C Language? A) Bjarne Stroustrup B) James A. Gosling C) Dennis Ritchie D) Dr. E.F. Codd 2. C Language developed at ---------------------- A) AT & T's Bell Laboratories of USA in 1970 B) Sun Microsystems in 1973 C) Cambridge University in 1972 D) None 3. C Programs are converted into machine language with the help of ------------------- A) An Editor B) A Compiler C) An Operating System D) None 4. Which one of the following is not a reserved word in C? A) auto B) case C) main D) int 5. Which one of the following is not a valid identifier? A)_Studentid B) 1studentid C) Studentid D) studentid1 6. Which of the following is NOT correct in C variable type? A) float B) real C)int d)double 7. An array elements are always stored in ----------------- memory locations. A) Sequential B) Random C)Sequnetial & Random D)None 8. What will be printed after execution of the following code? void main() { int arr[15]={1,2,3,4,5}; Printf(“%d”,arr[5]); } A) Garbage Value B) 0 C) 6 D) 5 9. What is the output of following code? #include <stdio.h> int main() { int i = -3; int k = i % 2;
  • 2. R.Amutha Assistant Professor, PSGCAS printf("%dn", k); } A) Compile time error B) 1 C) -1 d) 0 10. What will be the final value of x in the following C code? #include <stdio.h> void main() { int x = 5 * 9 / 3 + 9; } A) 24 B) 2 c) 4 D)Depends on compiler 11. A C variable cannot start with A) A number B) A special symbol other than underscore C) Both A &B D) None 12. What is the output of this C code? void main() { int y = 3; int x = 7 % 4 * 3 / 2; printf("Value of x is %d", x); } A) 1 B) 4 C)0 D)3 13. The precedence of arithmetic operators is (from highest to lowest)? A) %, *, /, +, - B) B. %, +, /, *, - C) C. +, -, %, *, / D) %, +, -, *, / 14. Which of the following is not an arithmetic operation? A. a *= 20; B) B. a /= 30; C) C. a %= 40; D) a != 50; 15. A single line comment in C language source code can begin with------------------- A) - B)-: C)/* D)// 16. How many main () function we can have in our program? A) 1 (B) 2 (C) No Limit (D) Depends on Compiler
  • 3. R.Amutha Assistant Professor, PSGCAS 17. Which of the following is executed by Preprocess? A) #include<stdio.h> B) return 0 (C) void main(int argc , char ** argv) (D) None of above 18. What is the output of this C code? void main() { int var = 010; printf("%d", var); } A)2 B)8 C)9 D)10 19. Which of the following statements is true for variable names in C? A) They can contain alphanumeric characters as well as special characters. B) It is not an error to declare a variable to be one of the keywords. C) Variable name cannot start with a digit. D) Variable can be of any length. 20. The format identifier ‘%i’ is also used for------------data type. A) char B)int C)float D)double 21.All Keywords in c are in------------------- A) Lower case B)Uppercase C)Camelcase D)none 22.What will be the output of the following C Code? #include<stdio.h> int main() { j=10; printf(“%dn”,j);; return 0; } A) 10 B)11 C)Compile time error D)0 23. --------------- library function used to round up the given float value into next integer value. A) Ceil() B) abs() c) floor() d) fabs()
  • 4. R.Amutha Assistant Professor, PSGCAS 24.A/An -------------------------- is an identifier that refers to a collection of data items that all have the same name. A) Variable B) Constant C) Array D) None 25. Which among the following is NOT a logical or relational operator? A) != B) = = C) || D)= 26. Maximum value of unsigned integer is ----------------- A) 65535 B)32767 C)-32767 D)-65535 27. Which of the following language is predecessor to ‘C’ Programming language? A) A B) B C) ADA D) C++ 28. In the passage of text, individual words and punctuation marks are known as A) Constants B) Operators C) Keywords D) Tokens 29. What is C Tokens? A) The smallest individual units of c program B) The basic element recognized by the compiler C) The largest individual units of program D) A & B Both 30. Each statement in a C program should end with ------------------ A) Semicolon ; B) Colon : C) Period . (dot symbol) D) None 31. Which of the following function compares 2 strings with case-insensitively? A)strcmp(s, t) B)strcmpcase(s, t) C)strcasecmp(s, t) D) strchr(s, t) 32. Which among the following is odd one out? A) printf B) fprintf C) putchar D) scanf 33. Escape sequence are prefixed with A)% B) C)” D); 34. What is the output of this C code? #include void main() { char c = 'd'; putchar(c); } A) Compile time error B) d C) Undefined behaviour D)None
  • 5. R.Amutha Assistant Professor, PSGCAS 35. What is the purpose of sprintf? A) It prints the data into stdout B) It writes the formatted data into a string C) It writes the formatted data into a file D) Both A & C 36. What will be the output of the following C code? #include <stdio.h> void main() { int const k = 5; k++; printf("k is %d", k); } A) k is 6 B) Error due to const succeeding int C) Error, because a constant variable can be changed only twice D) Error, because a constant variable cannot be changed 37. --------------is a conversion character used to display data item assigned decimal integer. A) i B)f C)d D)U 38. To print out a and b given below, which of the following printf() statement will you use? #include<stdio.h> void main() { float a=3.14; double b=3.16 } A) printf("%f %lf", a, b); B) printf("%Lf %f", a, b); C) printf("%Lf %Lf", a, b); D) printf("%f %Lf", a, b); 39. Data type of the controlling statement of a switch statement cannot be of the type A) int B)char C) short D)float 40. How long the following loop runs? for (x=0;x=3;x++) A) Three times B) Four times C) Forever D) never 41. A switch statement is used to A) To use switching variable B) switch between function in a program char
  • 6. R.Amutha Assistant Professor, PSGCAS C) Switch from one variable to another variable D) Too choose from multiple possibilities which may arise due to different values of single variable. 42. A labled statement consist of an identifier followed by a A): B); C). D), 43. How many times the loop will be executed for the following? for(digit=0;digit <9;digit++) { digit=2*digit; digit--; } A) Infinite B)9 C)0 D)None 44. The continue statement cannot be used with A) for B) while C) do while D) switch 45. Switch statement accepts. A) int B) char C) long D) All of the above 46. Which loop is guaranteed to execute at least one time. A) for B) while C) do while D)None 47. What is the output of this program? #include <stdio.h> void main() { int a=10; if(a=5) printf("YES"); else printf("NO"); } A) YES B) NO C) Error D)YESNO 48. Type of statement written in sequence and is repeated until specific condition met is classified as----- A) format B) loop C) case D) condition
  • 7. R.Amutha Assistant Professor, PSGCAS 49. --------- function reads character from keyboard. A) getchar() B)getc() C)putc() D)putchar() 50. ---------- function closes an opened file. A) fclose() B)getw() C)eof() D)feof() 51. The value of EOF is-------------- A) 0 B) -1 C) 1 D)10 52. Abbreviate ASCII with regard to C Language. A) Australian Standard Code for Information Interchange B) American Standard Code for Information Interchange C) American Symbolic Code for Information Interchange D) Australian Symbolic Code for Information Interchange 53. The ------------- statement ends the loop immediately when it is encountered. A) break B) continue C) goto D) if 54. The ---------- statement skips the current iteration of the loop and continues with the next iteration. A) break B) continue C) goto D) if 55. Label in Goto statement is same like A) Case in switch statement B) Initialization in for loop C) Continuation condition in for loop D) All of them 56. What is the final value of x when the code int x; for(x=0; x<10; x++) {} is run? A) 1 B) 9 C) 0 D) 10 57. How many times is a do while loop guaranteed to loop? A) 0 B) Infinitely C) 1 D) Variable 58. Choose the correct statements A) Array stores data of the same type B) Array can be a part of a structure C) Array of structure is allowed D) All of the above 59. What is the output of the following? #include <stdio.h> void main() {
  • 8. R.Amutha Assistant Professor, PSGCAS int x=22; if(x=10) printf("TRUE"); else printf("FALSE"); } A) TRUE B) FALSE C) Compile Error D) Runtime error 59. Find the output of the following #include<stdio.h> int main() { int a=10; if (a==10) { printf(“Hello…”); break; printf(“OK”); } Else { printf(“Hii”); } return 0; A) Hello B) Hello…OK C) OK D) Error 61. Find the output of following #include<stdio.h> void main() { int ok=-100; -100; Printf(“%d”,ok); } A) 100 B) Error C) -100 d)0
  • 9. R.Amutha Assistant Professor, PSGCAS Answers: 1. C 2. A 3. B 4. C 5. B 6. B 7. A 8. B 9. C 10. A 11. C 12. B 13. A 14.D 15. D 16. A 17. A 18. B 19. C 20. A 21. A 22. C 23. A 24. C 25. D 26. A 27. B 28. D 29. A 30. A 31. A 32. D 33. B 34.B 35.B 36.D 37. C 38. A 39.D 40.C 41.D 42.A 43.A 44.D 45.D 46.C 47.A 48.B 49.A 50.A 51.B 52.B 53.A 54.C 55.A 56.D 57.C 58.D 59.A 60.D 61.C