SlideShare une entreprise Scribd logo
1  sur  7
C++
Question #1
 What number of digits that can be accuratly stored in a float (based on
the IEEE Standard 754)?
a) 6
b) 38
c) An unlimited number
Answer: A
Question #2
 Which of the following is evaluated first:
a) &&
b) ||
c) !
Answer: C
Question #3
 What does 7/9*9 equal (in C and C++)?
a) 1
b) 0.08642
c) 0
Answer: C
Question #4
 Which is not valid in C?
a) class aClass{public:int x;};
b) /* A comment */
c) char x=12;
Answer: A
Question #5
 Which of the following is not a valid declaration for main()?
a) int main()
b) int main(int argc, char *argv[])
c) They both work
Answer: C
Question #6
 Evaluate as true or false: !(1 &&0 || !1)
a) True
b) False
c) Invalid statement
Answer: A
Question #7
 Which command properly allocates memory?
a) char *a=new char[20];
b) char a=new char[20];
c) char a=new char(20.0);
Answer: A
Question #8
 What operator is used to access a struct through a pointer?
a) ->
b) >>
c) *
Answer: C
Question #9
 Which is not an ANSII C++ function?
a) sin()
b) kbhit()
c) tmpnam()
Answer: B
Question #10
 True or false, if you keep incrementing a variable, it will become
negative?
a) True
b) False
c) It depends...
Answer: C
Question #11
 What character terminates all character array strings
a) 0
b) .
c) END
Answer: A
Question #12
 If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops
out first?
a) 5
b) 1
c) 3
Answer: A
Question #13
 What does strcat(an_array, "This"); do?
a) Copies "This" into an_array
b) Adds "This" to the end of an_array
c) Compares an_array and "This"
Answer: B
Question #14
 Evaluate:
int fn(int v)
{
if(v==1 || v==0)
return 1;
if(v%2==0)
return fn(v/2)+2;
else
return fn(v-1)+3;
}
for fn(7);
a) 10
b) 11
c) 1
Answer: B
Question #15
 Evalute the following: 22%5
a) 2
b) 4
c) 0
Answer: A
Question #16
 Which of the following data structures is on average the fastest for
retrieving data?
a) Binary Tree
b) Hash Table
c) Stack
Answer: B
Question #17
 What is the output:
int v()
{
int m=0;
return m++;
}
int main()
{
cout<<v();
}
a) 1
b) 0
c) Program is illegal
Answer: B
Question #18
 What does cout<<(0==0) print out?
a) 0
b) 1
c) Compiler error: Lvalue required
Answer: B
Question #19
 What is the maximum value of a unsigned char?
a) 255
b) 256
c) 128
Answer: A
Question #20
 Evaluate !(1&&1||1&&0)
a) Error
b) True
c) False
Answer: C
a) Error
b) True
c) False
Answer: C

Contenu connexe

Tendances

Théorie des langages - 01 - Compilation
Théorie des langages - 01 - CompilationThéorie des langages - 01 - Compilation
Théorie des langages - 01 - CompilationYann Caron
 
Test 2 Ardışık Sayılar
Test 2 Ardışık SayılarTest 2 Ardışık Sayılar
Test 2 Ardışık Sayılarsorucanavari
 
50 bài toán bồi dưỡng học sinh giỏi lớp 5 có lời giải
50 bài toán bồi dưỡng học sinh giỏi lớp 5 có lời giải50 bài toán bồi dưỡng học sinh giỏi lớp 5 có lời giải
50 bài toán bồi dưỡng học sinh giỏi lớp 5 có lời giảitoantieuhociq
 
Test 1 - Çarpanlara Ayırma
Test 1 - Çarpanlara AyırmaTest 1 - Çarpanlara Ayırma
Test 1 - Çarpanlara Ayırmasorucanavari
 
Test 5 Doğal Sayılar ve Tam Sayılar
Test 5 Doğal Sayılar ve Tam SayılarTest 5 Doğal Sayılar ve Tam Sayılar
Test 5 Doğal Sayılar ve Tam Sayılarsorucanavari
 
Test 1 Ebob - Ekok
Test 1 Ebob - EkokTest 1 Ebob - Ekok
Test 1 Ebob - Ekoksorucanavari
 
Một số dạng toán bồi dưỡng hsg môn Toán lớp 4
Một số dạng toán bồi dưỡng hsg môn Toán lớp 4Một số dạng toán bồi dưỡng hsg môn Toán lớp 4
Một số dạng toán bồi dưỡng hsg môn Toán lớp 4Bồi dưỡng Toán tiểu học
 
Chuyên đề hàm số
Chuyên đề hàm sốChuyên đề hàm số
Chuyên đề hàm sốToán THCS
 
10. Sınıf Matematik Deneme Sınavı - Cevap Anahtarlı
10. Sınıf Matematik Deneme Sınavı - Cevap Anahtarlı10. Sınıf Matematik Deneme Sınavı - Cevap Anahtarlı
10. Sınıf Matematik Deneme Sınavı - Cevap Anahtarlısorucanavari
 
Test 1 Tek ve Çift Sayılar
Test 1 Tek ve Çift SayılarTest 1 Tek ve Çift Sayılar
Test 1 Tek ve Çift Sayılarsorucanavari
 
Algoritmo matriz magica 3
Algoritmo matriz magica 3Algoritmo matriz magica 3
Algoritmo matriz magica 3aljego
 
50 bai-toan-boi-duong-hoc-sinh-gioi-lop-5-co-dap-an
50 bai-toan-boi-duong-hoc-sinh-gioi-lop-5-co-dap-an50 bai-toan-boi-duong-hoc-sinh-gioi-lop-5-co-dap-an
50 bai-toan-boi-duong-hoc-sinh-gioi-lop-5-co-dap-anmaquaivn
 

Tendances (20)

Théorie des langages - 01 - Compilation
Théorie des langages - 01 - CompilationThéorie des langages - 01 - Compilation
Théorie des langages - 01 - Compilation
 
Test 2 Ardışık Sayılar
Test 2 Ardışık SayılarTest 2 Ardışık Sayılar
Test 2 Ardışık Sayılar
 
50 bài toán bồi dưỡng học sinh giỏi lớp 5 có lời giải
50 bài toán bồi dưỡng học sinh giỏi lớp 5 có lời giải50 bài toán bồi dưỡng học sinh giỏi lớp 5 có lời giải
50 bài toán bồi dưỡng học sinh giỏi lớp 5 có lời giải
 
Bồi dưỡng HSG môn toán lớp 7 qua 16 chuyên đề - Thầy Thích
Bồi dưỡng HSG môn toán lớp 7 qua 16 chuyên đề - Thầy ThíchBồi dưỡng HSG môn toán lớp 7 qua 16 chuyên đề - Thầy Thích
Bồi dưỡng HSG môn toán lớp 7 qua 16 chuyên đề - Thầy Thích
 
Test 1 - Çarpanlara Ayırma
Test 1 - Çarpanlara AyırmaTest 1 - Çarpanlara Ayırma
Test 1 - Çarpanlara Ayırma
 
Test 5 Doğal Sayılar ve Tam Sayılar
Test 5 Doğal Sayılar ve Tam SayılarTest 5 Doğal Sayılar ve Tam Sayılar
Test 5 Doğal Sayılar ve Tam Sayılar
 
28 ĐỀ THI VÀO LỚP 6 MÔN TOÁN CÓ HDG THAM KHẢO
28 ĐỀ THI VÀO LỚP 6 MÔN TOÁN CÓ HDG THAM KHẢO28 ĐỀ THI VÀO LỚP 6 MÔN TOÁN CÓ HDG THAM KHẢO
28 ĐỀ THI VÀO LỚP 6 MÔN TOÁN CÓ HDG THAM KHẢO
 
Đề thi công chức môn tin học
Đề thi công chức môn tin họcĐề thi công chức môn tin học
Đề thi công chức môn tin học
 
Tu dien-vuong-tinh-chat
Tu dien-vuong-tinh-chatTu dien-vuong-tinh-chat
Tu dien-vuong-tinh-chat
 
Test 1 Ebob - Ekok
Test 1 Ebob - EkokTest 1 Ebob - Ekok
Test 1 Ebob - Ekok
 
Một số dạng toán bồi dưỡng hsg môn Toán lớp 4
Một số dạng toán bồi dưỡng hsg môn Toán lớp 4Một số dạng toán bồi dưỡng hsg môn Toán lớp 4
Một số dạng toán bồi dưỡng hsg môn Toán lớp 4
 
Đề Thi HK2 Toán 8 - THCS Phú Định
Đề Thi HK2 Toán 8 - THCS Phú ĐịnhĐề Thi HK2 Toán 8 - THCS Phú Định
Đề Thi HK2 Toán 8 - THCS Phú Định
 
Chuyên đề hàm số
Chuyên đề hàm sốChuyên đề hàm số
Chuyên đề hàm số
 
Luận văn: Định lý bézout và chiều ngược lại, HAY, 9đ
Luận văn: Định lý bézout và chiều ngược lại, HAY, 9đLuận văn: Định lý bézout và chiều ngược lại, HAY, 9đ
Luận văn: Định lý bézout và chiều ngược lại, HAY, 9đ
 
10. Sınıf Matematik Deneme Sınavı - Cevap Anahtarlı
10. Sınıf Matematik Deneme Sınavı - Cevap Anahtarlı10. Sınıf Matematik Deneme Sınavı - Cevap Anahtarlı
10. Sınıf Matematik Deneme Sınavı - Cevap Anahtarlı
 
PPT Pola Bilangan
PPT Pola BilanganPPT Pola Bilangan
PPT Pola Bilangan
 
Test 1 Tek ve Çift Sayılar
Test 1 Tek ve Çift SayılarTest 1 Tek ve Çift Sayılar
Test 1 Tek ve Çift Sayılar
 
Một số chuyên đề bồi dưỡng HSG môn Toán lớp 8
Một số chuyên đề bồi dưỡng HSG môn Toán lớp 8Một số chuyên đề bồi dưỡng HSG môn Toán lớp 8
Một số chuyên đề bồi dưỡng HSG môn Toán lớp 8
 
Algoritmo matriz magica 3
Algoritmo matriz magica 3Algoritmo matriz magica 3
Algoritmo matriz magica 3
 
50 bai-toan-boi-duong-hoc-sinh-gioi-lop-5-co-dap-an
50 bai-toan-boi-duong-hoc-sinh-gioi-lop-5-co-dap-an50 bai-toan-boi-duong-hoc-sinh-gioi-lop-5-co-dap-an
50 bai-toan-boi-duong-hoc-sinh-gioi-lop-5-co-dap-an
 

Similaire à Ques c++ minhnd

(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
 
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
 
MATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdfMATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdfahmed8651
 
important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomeshpraveensomesh
 
C multiple choice questions and answers pdf
C multiple choice questions and answers pdfC multiple choice questions and answers pdf
C multiple choice questions and answers pdfchoconyeuquy
 
1z0 851 exam-java standard edition 6 programmer certified professional
1z0 851 exam-java standard edition 6 programmer certified professional1z0 851 exam-java standard edition 6 programmer certified professional
1z0 851 exam-java standard edition 6 programmer certified professionalIsabella789
 
ExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docxExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docxgitagrimston
 
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
 
Ramco Sample Paper 2003
Ramco  Sample  Paper 2003Ramco  Sample  Paper 2003
Ramco Sample Paper 2003ncct
 
Computer programming mcqs
Computer programming mcqsComputer programming mcqs
Computer programming mcqssaadkhan672
 
Java Questioner for
Java Questioner for Java Questioner for
Java Questioner for Abhay Korat
 
Technical aptitude test 2 CSE
Technical aptitude test 2 CSETechnical aptitude test 2 CSE
Technical aptitude test 2 CSESujata Regoti
 
Data structures and algorithms unit i
Data structures and algorithms unit iData structures and algorithms unit i
Data structures and algorithms unit isonalisraisoni
 
100 c interview questions answers
100 c interview questions answers100 c interview questions answers
100 c interview questions answersSareen Kumar
 
Technical questions for interview c programming
Technical questions for interview  c programmingTechnical questions for interview  c programming
Technical questions for interview c programmingCHANDAN KUMAR
 

Similaire à Ques c++ minhnd (20)

(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
 
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
 
MATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdfMATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdf
 
important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomesh
 
Cs101 endsem 2014
Cs101 endsem 2014Cs101 endsem 2014
Cs101 endsem 2014
 
C multiple choice questions and answers pdf
C multiple choice questions and answers pdfC multiple choice questions and answers pdf
C multiple choice questions and answers pdf
 
1z0 851 exam-java standard edition 6 programmer certified professional
1z0 851 exam-java standard edition 6 programmer certified professional1z0 851 exam-java standard edition 6 programmer certified professional
1z0 851 exam-java standard edition 6 programmer certified professional
 
ExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docxExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docx
 
Gate-Cs 1999
Gate-Cs 1999Gate-Cs 1999
Gate-Cs 1999
 
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
 
Ramco Sample Paper 2003
Ramco  Sample  Paper 2003Ramco  Sample  Paper 2003
Ramco Sample Paper 2003
 
Ansi c
Ansi cAnsi c
Ansi c
 
Computer programming mcqs
Computer programming mcqsComputer programming mcqs
Computer programming mcqs
 
C MCQ
C MCQC MCQ
C MCQ
 
FSOFT - Test Java Exam
FSOFT - Test Java ExamFSOFT - Test Java Exam
FSOFT - Test Java Exam
 
Java Questioner for
Java Questioner for Java Questioner for
Java Questioner for
 
Technical aptitude test 2 CSE
Technical aptitude test 2 CSETechnical aptitude test 2 CSE
Technical aptitude test 2 CSE
 
Data structures and algorithms unit i
Data structures and algorithms unit iData structures and algorithms unit i
Data structures and algorithms unit i
 
100 c interview questions answers
100 c interview questions answers100 c interview questions answers
100 c interview questions answers
 
Technical questions for interview c programming
Technical questions for interview  c programmingTechnical questions for interview  c programming
Technical questions for interview c programming
 

Dernier

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
"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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
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
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 

Dernier (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
"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 ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Ques c++ minhnd

  • 1. C++ Question #1  What number of digits that can be accuratly stored in a float (based on the IEEE Standard 754)? a) 6 b) 38 c) An unlimited number Answer: A Question #2  Which of the following is evaluated first: a) && b) || c) ! Answer: C Question #3  What does 7/9*9 equal (in C and C++)? a) 1 b) 0.08642 c) 0 Answer: C Question #4  Which is not valid in C? a) class aClass{public:int x;}; b) /* A comment */ c) char x=12; Answer: A Question #5  Which of the following is not a valid declaration for main()?
  • 2. a) int main() b) int main(int argc, char *argv[]) c) They both work Answer: C Question #6  Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement Answer: A Question #7  Which command properly allocates memory? a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0); Answer: A Question #8  What operator is used to access a struct through a pointer? a) -> b) >> c) * Answer: C Question #9  Which is not an ANSII C++ function?
  • 3. a) sin() b) kbhit() c) tmpnam() Answer: B Question #10  True or false, if you keep incrementing a variable, it will become negative? a) True b) False c) It depends... Answer: C Question #11  What character terminates all character array strings a) 0 b) . c) END Answer: A Question #12  If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first? a) 5 b) 1 c) 3 Answer: A Question #13  What does strcat(an_array, "This"); do?
  • 4. a) Copies "This" into an_array b) Adds "This" to the end of an_array c) Compares an_array and "This" Answer: B Question #14  Evaluate: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); a) 10 b) 11 c) 1 Answer: B Question #15  Evalute the following: 22%5 a) 2 b) 4 c) 0 Answer: A Question #16  Which of the following data structures is on average the fastest for retrieving data? a) Binary Tree b) Hash Table
  • 5. c) Stack Answer: B Question #17  What is the output: int v() { int m=0; return m++; } int main() { cout<<v(); } a) 1 b) 0 c) Program is illegal Answer: B Question #18  What does cout<<(0==0) print out? a) 0 b) 1 c) Compiler error: Lvalue required Answer: B Question #19  What is the maximum value of a unsigned char? a) 255 b) 256 c) 128 Answer: A Question #20  Evaluate !(1&&1||1&&0)
  • 6. a) Error b) True c) False Answer: C
  • 7. a) Error b) True c) False Answer: C