SlideShare a Scribd company logo
1 of 11
Technical quiz 5
1Q - What is the outpout of the following program?
#include<stdio.h>
main() {
enum {
india, is=7, GREAT
};
printf("%d %d", india, GREAT);
}
A - 0 1.
B - 0 2
C - 0 8
D - Compile error
2Q - What is the output of the following program?
#include<stdio.h>
main() { }
A - No output
B - Garbage
C - Compile error
D - Runtime error
3Q - What is the output of the following program?
#include<stdio.h>
main() {
int i = 1;
while( i++<=5 )
printf("%d ",i++);
}
A - 1 3 5
B - 2 4
C - 2 4 6
D - 2
4Q - Choose the application option for the following program?
#include<stdio.h>
main() {
int *p, **q;
printf("%un", sizeof(p));
printf("%un", sizeof(q));
}
A - Both the printf() will print the same value
B - First printf() prints the value less than the second.
C - Second printf() prints the value less than the first.
D - Error in the code.
 5Q - Following is the invalid inclusion of a file to the current program.
Identify it.
 A - #include <file>
 B - #include “file”
 C - #include < file
 D - All of the above are invalid.
6Q - What is the output of the following program?
#include<stdio.h>
void f() {
static int i = 3;
printf("%d ", i);
if(--i) f();
}
main() {
f();
}
A - 3 2 1 0
B - 3 2 1
C - 3 3 3
D - Compile error
7Q - In the following code, what is 'P'?
Typedef char *charp; const charp P;
A - P is a constant
B - P is a character type
C - P is a pointer
D - None of the above
 8Q - int x=~1; What is the value of 'x'?
 A - 1
 B - -1
 C - 2
 D - -2
 9Q - The correct order of evaluation for the expression “z = x + y * z / 4 % 2 –
1”
 A - * / % = + -
 B - / * % - + =
 C - - + = * % /
 D - * / % + - =
10Q - In the given below code, what will be the value of a variable x?
#include<stdio.h>
int main() {
int y = 100;
const int x = y;
printf("%dn", x);
return 0;
}
A - 100
B - 0
C - Print x
D - Return Error

More Related Content

Similar to Technical quiz 5#.pptx

Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILEDipta Saha
 
cuptopointer-180804092048-190306091149 (2).pdf
cuptopointer-180804092048-190306091149 (2).pdfcuptopointer-180804092048-190306091149 (2).pdf
cuptopointer-180804092048-190306091149 (2).pdfYashwanthCse
 
Compiler Construction | Lecture 2 | Declarative Syntax Definition
Compiler Construction | Lecture 2 | Declarative Syntax DefinitionCompiler Construction | Lecture 2 | Declarative Syntax Definition
Compiler Construction | Lecture 2 | Declarative Syntax DefinitionEelco Visser
 
Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7alish sha
 
Fuzail_File_C.docx
Fuzail_File_C.docxFuzail_File_C.docx
Fuzail_File_C.docxSyedFuzail14
 
CS4200 2019 | Lecture 2 | syntax-definition
CS4200 2019 | Lecture 2 | syntax-definitionCS4200 2019 | Lecture 2 | syntax-definition
CS4200 2019 | Lecture 2 | syntax-definitionEelco Visser
 
Lec14-CS110 Computational Engineering
Lec14-CS110 Computational EngineeringLec14-CS110 Computational Engineering
Lec14-CS110 Computational EngineeringSri Harsha Pamu
 
Best C Programming Solution
Best C Programming SolutionBest C Programming Solution
Best C Programming Solutionyogini sharma
 
Bti1022 lab sheet 3
Bti1022 lab sheet 3Bti1022 lab sheet 3
Bti1022 lab sheet 3alish sha
 
C++ lab assignment
C++ lab assignmentC++ lab assignment
C++ lab assignmentSaket Pathak
 

Similar to Technical quiz 5#.pptx (20)

Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILE
 
cuptopointer-180804092048-190306091149 (2).pdf
cuptopointer-180804092048-190306091149 (2).pdfcuptopointer-180804092048-190306091149 (2).pdf
cuptopointer-180804092048-190306091149 (2).pdf
 
Compiler Construction | Lecture 2 | Declarative Syntax Definition
Compiler Construction | Lecture 2 | Declarative Syntax DefinitionCompiler Construction | Lecture 2 | Declarative Syntax Definition
Compiler Construction | Lecture 2 | Declarative Syntax Definition
 
Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7
 
Fuzail_File_C.docx
Fuzail_File_C.docxFuzail_File_C.docx
Fuzail_File_C.docx
 
Linux_C_LabBasics.ppt
Linux_C_LabBasics.pptLinux_C_LabBasics.ppt
Linux_C_LabBasics.ppt
 
CS4200 2019 | Lecture 2 | syntax-definition
CS4200 2019 | Lecture 2 | syntax-definitionCS4200 2019 | Lecture 2 | syntax-definition
CS4200 2019 | Lecture 2 | syntax-definition
 
Lec14-CS110 Computational Engineering
Lec14-CS110 Computational EngineeringLec14-CS110 Computational Engineering
Lec14-CS110 Computational Engineering
 
C Programming
C ProgrammingC Programming
C Programming
 
Best C Programming Solution
Best C Programming SolutionBest C Programming Solution
Best C Programming Solution
 
Functions
FunctionsFunctions
Functions
 
C PROGRAMS
C PROGRAMSC PROGRAMS
C PROGRAMS
 
175035 cse lab-05
175035 cse lab-05 175035 cse lab-05
175035 cse lab-05
 
Bti1022 lab sheet 3
Bti1022 lab sheet 3Bti1022 lab sheet 3
Bti1022 lab sheet 3
 
Automata fix.pdf
Automata fix.pdfAutomata fix.pdf
Automata fix.pdf
 
Hargun
HargunHargun
Hargun
 
C++ lab assignment
C++ lab assignmentC++ lab assignment
C++ lab assignment
 
C++ manual Report Full
C++ manual Report FullC++ manual Report Full
C++ manual Report Full
 
C programs pbq final
C programs pbq finalC programs pbq final
C programs pbq final
 
C test
C testC test
C test
 

Recently uploaded

Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringWSO2
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxMarkSteadman7
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityVictorSzoltysek
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfdanishmna97
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaWSO2
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformWSO2
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data SciencePaolo Missier
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 

Recently uploaded (20)

Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 

Technical quiz 5#.pptx

  • 2. 1Q - What is the outpout of the following program? #include<stdio.h> main() { enum { india, is=7, GREAT }; printf("%d %d", india, GREAT); } A - 0 1. B - 0 2 C - 0 8 D - Compile error
  • 3. 2Q - What is the output of the following program? #include<stdio.h> main() { } A - No output B - Garbage C - Compile error D - Runtime error
  • 4. 3Q - What is the output of the following program? #include<stdio.h> main() { int i = 1; while( i++<=5 ) printf("%d ",i++); } A - 1 3 5 B - 2 4 C - 2 4 6 D - 2
  • 5. 4Q - Choose the application option for the following program? #include<stdio.h> main() { int *p, **q; printf("%un", sizeof(p)); printf("%un", sizeof(q)); } A - Both the printf() will print the same value B - First printf() prints the value less than the second. C - Second printf() prints the value less than the first. D - Error in the code.
  • 6.  5Q - Following is the invalid inclusion of a file to the current program. Identify it.  A - #include <file>  B - #include “file”  C - #include < file  D - All of the above are invalid.
  • 7. 6Q - What is the output of the following program? #include<stdio.h> void f() { static int i = 3; printf("%d ", i); if(--i) f(); } main() { f(); } A - 3 2 1 0 B - 3 2 1 C - 3 3 3 D - Compile error
  • 8. 7Q - In the following code, what is 'P'? Typedef char *charp; const charp P; A - P is a constant B - P is a character type C - P is a pointer D - None of the above
  • 9.  8Q - int x=~1; What is the value of 'x'?  A - 1  B - -1  C - 2  D - -2
  • 10.  9Q - The correct order of evaluation for the expression “z = x + y * z / 4 % 2 – 1”  A - * / % = + -  B - / * % - + =  C - - + = * % /  D - * / % + - =
  • 11. 10Q - In the given below code, what will be the value of a variable x? #include<stdio.h> int main() { int y = 100; const int x = y; printf("%dn", x); return 0; } A - 100 B - 0 C - Print x D - Return Error