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

Istqb question-paper-dump-5
Istqb question-paper-dump-5Istqb question-paper-dump-5
Istqb question-paper-dump-5TestingGeeks
 
Panel de Control de Nominalia: ¡Sácale partido!
Panel de Control de Nominalia: ¡Sácale partido!Panel de Control de Nominalia: ¡Sácale partido!
Panel de Control de Nominalia: ¡Sácale partido!Nominalia
 
Requirements engineering process in software engineering
Requirements engineering process in software engineeringRequirements engineering process in software engineering
Requirements engineering process in software engineeringPreeti Mishra
 
Chapter 08
Chapter 08Chapter 08
Chapter 08guru3188
 
Satisfiability
SatisfiabilitySatisfiability
SatisfiabilityJim Kukula
 
Unit iv-syntax-directed-translation
Unit iv-syntax-directed-translationUnit iv-syntax-directed-translation
Unit iv-syntax-directed-translationAjith kumar M P
 
Requirements engineering scenario based software requirement specification
Requirements engineering scenario based software requirement specificationRequirements engineering scenario based software requirement specification
Requirements engineering scenario based software requirement specificationWolfgang Kuchinke
 
Kecerdasan Buatan (AI)
Kecerdasan Buatan (AI)Kecerdasan Buatan (AI)
Kecerdasan Buatan (AI)Farichah Riha
 
C and data structure
C and data structureC and data structure
C and data structureprabhatjon
 
Chapter 13 software testing strategies
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategiesSHREEHARI WADAWADAGI
 
Chapter 6 software metrics
Chapter 6 software metricsChapter 6 software metrics
Chapter 6 software metricsdespicable me
 
Makalah Prinsip Kerja Komputer
Makalah Prinsip Kerja KomputerMakalah Prinsip Kerja Komputer
Makalah Prinsip Kerja KomputerNaufalAryudi
 
Formal Verification
Formal VerificationFormal Verification
Formal VerificationIlia Levin
 
A generic view of software engineering
A generic view of software engineeringA generic view of software engineering
A generic view of software engineeringInocentshuja Ahmad
 

What's hot (20)

Daa notes 2
Daa notes 2Daa notes 2
Daa notes 2
 
Compiler Design Quiz
Compiler Design QuizCompiler Design Quiz
Compiler Design Quiz
 
Istqb question-paper-dump-5
Istqb question-paper-dump-5Istqb question-paper-dump-5
Istqb question-paper-dump-5
 
Panel de Control de Nominalia: ¡Sácale partido!
Panel de Control de Nominalia: ¡Sácale partido!Panel de Control de Nominalia: ¡Sácale partido!
Panel de Control de Nominalia: ¡Sácale partido!
 
SE Quiz
SE QuizSE Quiz
SE Quiz
 
Requirements engineering process in software engineering
Requirements engineering process in software engineeringRequirements engineering process in software engineering
Requirements engineering process in software engineering
 
Analysis modeling
Analysis modelingAnalysis modeling
Analysis modeling
 
Complexity metrics and models
Complexity metrics and modelsComplexity metrics and models
Complexity metrics and models
 
Defect prevention
Defect preventionDefect prevention
Defect prevention
 
Chapter 08
Chapter 08Chapter 08
Chapter 08
 
Satisfiability
SatisfiabilitySatisfiability
Satisfiability
 
Unit iv-syntax-directed-translation
Unit iv-syntax-directed-translationUnit iv-syntax-directed-translation
Unit iv-syntax-directed-translation
 
Requirements engineering scenario based software requirement specification
Requirements engineering scenario based software requirement specificationRequirements engineering scenario based software requirement specification
Requirements engineering scenario based software requirement specification
 
Kecerdasan Buatan (AI)
Kecerdasan Buatan (AI)Kecerdasan Buatan (AI)
Kecerdasan Buatan (AI)
 
C and data structure
C and data structureC and data structure
C and data structure
 
Chapter 13 software testing strategies
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategies
 
Chapter 6 software metrics
Chapter 6 software metricsChapter 6 software metrics
Chapter 6 software metrics
 
Makalah Prinsip Kerja Komputer
Makalah Prinsip Kerja KomputerMakalah Prinsip Kerja Komputer
Makalah Prinsip Kerja Komputer
 
Formal Verification
Formal VerificationFormal Verification
Formal Verification
 
A generic view of software engineering
A generic view of software engineeringA generic view of software engineering
A generic view of software engineering
 

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
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)Ankit Dubey
 
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
 

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
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)
 
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
 

Recently uploaded

How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 

Recently uploaded (20)

How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 

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