SlideShare a Scribd company logo
1 of 20
1. What will be the output of the
following code.
int a=1;
printf("n%d %d %d",--a,a++,++a);
a. 2 2 2
b. 0 0 2
c. 0 0 1
d. 0 1 2
e. none of these
G-Quiz (C programming)
1. What will be the output of the
following code.
int a=1;
printf("n%d %d %d",--a,a++,++a);
a. 2 2 2
b. 0 0 2
c. 0 0 1
d. 0 1 2
e. none of these
G-Quiz (C programming)
Correct Answer
a
2. Which loop is called as exit controlled
loop?
a. while
b. do-while
c. while(1)
d. for
e. none of these
G-Quiz (C programming)
2. Which loop is called as exit controlled
loop?
a. while
b. do-while
c. while(1)
d. for
e. none of these
G-Quiz (C programming)
Correct Answer
b
3. What will be the output of the following
code.
a=5;
b=a++;
a=b?++a:a--;
printf("n%d",--a);
a. 4 b. 5 c. 6 d. 7
e. none of these
G-Quiz (C programming)
3. What will be the output of the following
code.
a=5;
b=a++;
a=b?++a:a--;
printf("n%d",--a);
a. 4 b. 5 c. 6 d. 7
e. none of these
G-Quiz (C programming)
Correct Answer
c
4. Which of the following special symbol
allowed in a variable name?
a. * (asterisk)
b. | (pipeline)
c. - (hyphen)
d. _ (underscore)
G-Quiz (C programming)
4. Which of the following special symbol
allowed in a variable name?
a. * (asterisk)
b. | (pipeline)
c. - (hyphen)
d. _ (underscore)
G-Quiz (C programming)
Correct Answer
d
5. How many times "IPL" is printed?
#include<stdio.h>
int main()
{
int x;
for(x=-1; x<=10; x++)
{
if(x < 5)
continue;
else
break;
printf("IPL");
}
return 0;
}
G-Quiz (C programming)
a. Infinite times
b. 11 times
c. 0 times
d. 1 time
5. How many times "IPL" is printed?
#include<stdio.h>
int main()
{
int x;
for(x=-1; x<=10; x++)
{
if(x < 5)
continue;
else
break;
printf("IPL");
}
return 0;
}
a. Infinite times
b. 11 times
c. 0 times
d. 1 time
G-Quiz (C programming)
Correct Answer
c
6. Which of the following is not logical
operator?
a. &
b. &&
c. ||
d. !
G-Quiz (C programming)
6. Which of the following is not logical
operator?
a. &
b. &&
c. ||
d. !
G-Quiz (C programming)
Correct Answer
a
7. Which bitwise operator is suitable for
turning off a particular bit in a number?
a. && operator
b. & operator
c || operator
d. ! operator
G-Quiz (C programming)
7. Which bitwise operator is suitable for
turning off a particular bit in a number?
a. && operator
b. & operator
c || operator
d. ! operator
G-Quiz (C programming)
Correct Answer
b
8. In mathematics and computer
programming, which is the correct
order of mathematical operators ?
G-Quiz (C programming)
a. Addition, Subtraction, Multiplication, Division
b. Division, Multiplication, Addition, Subtraction
c. Multiplication, Addition, Division, Subtraction
d. Addition, Division, Modulus, Subtraction
8. In mathematics and computer
programming, which is the correct
order of mathematical operators ?
G-Quiz (C programming)
a. Addition, Subtraction, Multiplication, Division
b. Division, Multiplication, Addition, Subtraction
c. Multiplication, Addition, Division, Subtraction
d. Addition, Division, Modulus, Subtraction
Correct Answer = b
9. Which of the following cannot be
checked in a switch-case statement?
G-Quiz (C programming)
a. char
b. int
c. float
d. enum
9. Which of the following cannot be
checked in a switch-case statement?
G-Quiz (C programming)
a. char
b. int
c. float
d. enum
Correct Answer
c
10. Which of the following are unary
operators in C?
1. !
2. sizeof
3. ~
4. &&
G-Quiz (C programming)
a. 1, 2 b. 1, 3
c. 2, 4 d. 1, 2, 3
10. Which of the following are unary
operators in C?
1. !
2. sizeof
3. ~
4. &&
G-Quiz (C programming)
a. 1, 2 b. 1, 3
c. 2, 4 d. 1, 2, 3
Correct Answer
d

More Related Content

Similar to G quiz

Data structures and algorithms unit i
Data structures and algorithms unit iData structures and algorithms unit i
Data structures and algorithms unit isonalisraisoni
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)Ankit Dubey
 
CDAC CCAT examination important question
CDAC CCAT examination important questionCDAC CCAT examination important question
CDAC CCAT examination important questionprabhatjon
 
pointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjb
pointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjbpointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjb
pointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjbTUSHARGAURAV11
 
pointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjb
pointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjbpointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjb
pointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjbTUSHARGAURAV11
 
C language questions_answers_explanation
C language questions_answers_explanationC language questions_answers_explanation
C language questions_answers_explanationsrinath v
 
Computer programming mcqs
Computer programming mcqsComputer programming mcqs
Computer programming mcqssaadkhan672
 
Dti2143 chapter 3 arithmatic relation-logicalexpression
Dti2143 chapter 3 arithmatic relation-logicalexpressionDti2143 chapter 3 arithmatic relation-logicalexpression
Dti2143 chapter 3 arithmatic relation-logicalexpressionalish sha
 
Java questions1
Java questions1Java questions1
Java questions1yash4884
 
C - programming - Ankit Kumar Singh
C - programming - Ankit Kumar Singh C - programming - Ankit Kumar Singh
C - programming - Ankit Kumar Singh AnkitSinghRajput35
 
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
 

Similar to G quiz (20)

Data structures and algorithms unit i
Data structures and algorithms unit iData structures and algorithms unit i
Data structures and algorithms unit i
 
operators.ppt
operators.pptoperators.ppt
operators.ppt
 
Java Quiz
Java QuizJava Quiz
Java Quiz
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)
 
Test2
Test2Test2
Test2
 
C test
C testC test
C test
 
Technical questions
Technical questionsTechnical questions
Technical questions
 
Technical quiz 5#.pptx
Technical quiz 5#.pptxTechnical quiz 5#.pptx
Technical quiz 5#.pptx
 
UNIT 2 LOOP CONTROL.pptx
UNIT 2 LOOP CONTROL.pptxUNIT 2 LOOP CONTROL.pptx
UNIT 2 LOOP CONTROL.pptx
 
CDAC CCAT examination important question
CDAC CCAT examination important questionCDAC CCAT examination important question
CDAC CCAT examination important question
 
pointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjb
pointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjbpointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjb
pointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjb
 
pointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjb
pointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjbpointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjb
pointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjb
 
C language questions_answers_explanation
C language questions_answers_explanationC language questions_answers_explanation
C language questions_answers_explanation
 
Part - 2 Cpp programming Solved MCQ
Part - 2  Cpp programming Solved MCQ Part - 2  Cpp programming Solved MCQ
Part - 2 Cpp programming Solved MCQ
 
Computer programming mcqs
Computer programming mcqsComputer programming mcqs
Computer programming mcqs
 
Dti2143 chapter 3 arithmatic relation-logicalexpression
Dti2143 chapter 3 arithmatic relation-logicalexpressionDti2143 chapter 3 arithmatic relation-logicalexpression
Dti2143 chapter 3 arithmatic relation-logicalexpression
 
C taw12 70
C taw12 70C taw12 70
C taw12 70
 
Java questions1
Java questions1Java questions1
Java questions1
 
C - programming - Ankit Kumar Singh
C - programming - Ankit Kumar Singh C - programming - Ankit Kumar Singh
C - programming - Ankit Kumar Singh
 
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
 

Recently uploaded

Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesAmanpreetKaur157993
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFVivekanand Anglo Vedic Academy
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...Nguyen Thanh Tu Collection
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxLimon Prince
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17Celine George
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17Celine George
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code ExamplesPeter Brusilovsky
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMELOISARIVERA8
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppCeline George
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................MirzaAbrarBaig5
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjMohammed Sikander
 

Recently uploaded (20)

Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 

G quiz

  • 1. 1. What will be the output of the following code. int a=1; printf("n%d %d %d",--a,a++,++a); a. 2 2 2 b. 0 0 2 c. 0 0 1 d. 0 1 2 e. none of these G-Quiz (C programming)
  • 2. 1. What will be the output of the following code. int a=1; printf("n%d %d %d",--a,a++,++a); a. 2 2 2 b. 0 0 2 c. 0 0 1 d. 0 1 2 e. none of these G-Quiz (C programming) Correct Answer a
  • 3. 2. Which loop is called as exit controlled loop? a. while b. do-while c. while(1) d. for e. none of these G-Quiz (C programming)
  • 4. 2. Which loop is called as exit controlled loop? a. while b. do-while c. while(1) d. for e. none of these G-Quiz (C programming) Correct Answer b
  • 5. 3. What will be the output of the following code. a=5; b=a++; a=b?++a:a--; printf("n%d",--a); a. 4 b. 5 c. 6 d. 7 e. none of these G-Quiz (C programming)
  • 6. 3. What will be the output of the following code. a=5; b=a++; a=b?++a:a--; printf("n%d",--a); a. 4 b. 5 c. 6 d. 7 e. none of these G-Quiz (C programming) Correct Answer c
  • 7. 4. Which of the following special symbol allowed in a variable name? a. * (asterisk) b. | (pipeline) c. - (hyphen) d. _ (underscore) G-Quiz (C programming)
  • 8. 4. Which of the following special symbol allowed in a variable name? a. * (asterisk) b. | (pipeline) c. - (hyphen) d. _ (underscore) G-Quiz (C programming) Correct Answer d
  • 9. 5. How many times "IPL" is printed? #include<stdio.h> int main() { int x; for(x=-1; x<=10; x++) { if(x < 5) continue; else break; printf("IPL"); } return 0; } G-Quiz (C programming) a. Infinite times b. 11 times c. 0 times d. 1 time
  • 10. 5. How many times "IPL" is printed? #include<stdio.h> int main() { int x; for(x=-1; x<=10; x++) { if(x < 5) continue; else break; printf("IPL"); } return 0; } a. Infinite times b. 11 times c. 0 times d. 1 time G-Quiz (C programming) Correct Answer c
  • 11. 6. Which of the following is not logical operator? a. & b. && c. || d. ! G-Quiz (C programming)
  • 12. 6. Which of the following is not logical operator? a. & b. && c. || d. ! G-Quiz (C programming) Correct Answer a
  • 13. 7. Which bitwise operator is suitable for turning off a particular bit in a number? a. && operator b. & operator c || operator d. ! operator G-Quiz (C programming)
  • 14. 7. Which bitwise operator is suitable for turning off a particular bit in a number? a. && operator b. & operator c || operator d. ! operator G-Quiz (C programming) Correct Answer b
  • 15. 8. In mathematics and computer programming, which is the correct order of mathematical operators ? G-Quiz (C programming) a. Addition, Subtraction, Multiplication, Division b. Division, Multiplication, Addition, Subtraction c. Multiplication, Addition, Division, Subtraction d. Addition, Division, Modulus, Subtraction
  • 16. 8. In mathematics and computer programming, which is the correct order of mathematical operators ? G-Quiz (C programming) a. Addition, Subtraction, Multiplication, Division b. Division, Multiplication, Addition, Subtraction c. Multiplication, Addition, Division, Subtraction d. Addition, Division, Modulus, Subtraction Correct Answer = b
  • 17. 9. Which of the following cannot be checked in a switch-case statement? G-Quiz (C programming) a. char b. int c. float d. enum
  • 18. 9. Which of the following cannot be checked in a switch-case statement? G-Quiz (C programming) a. char b. int c. float d. enum Correct Answer c
  • 19. 10. Which of the following are unary operators in C? 1. ! 2. sizeof 3. ~ 4. && G-Quiz (C programming) a. 1, 2 b. 1, 3 c. 2, 4 d. 1, 2, 3
  • 20. 10. Which of the following are unary operators in C? 1. ! 2. sizeof 3. ~ 4. && G-Quiz (C programming) a. 1, 2 b. 1, 3 c. 2, 4 d. 1, 2, 3 Correct Answer d