SlideShare a Scribd company logo
9/24/2014 C Programming- While Loops | C Programming Interview Questions and Answers | Freshers Jobs | Walkins | Offcampus | Placement Papers | Fresher…
http://www.freshershine.com/mock-test/c-programming/c-programming-while-loops-c-programming-interview-questions-and-answers/ 1/7
Jobs
Latest
A ds by O ffersWizard A d O ptions
Question 1 WRONG
In while loop after loop
After loop
Compile time error
Infinite loop
Question 2 WRONG
Home > Mock Test > C Programming > C Programming- While Loops | C Programming Interview Questions and
Answers
CProgramming- WhileLoops|CProgrammingInterviewQuestions
andAnswers
C Programming- While Loops
Congratulations - you have completed C Programming- While Loops. You scored 0 out of 15. Your
performance has been rated as Need more practice!
Your answers are highlighted below.
What is the output of this C code?
#include
int main()
{
while ()
printf("In while loop ");
printf("After loopn");
}
What is the output of this C code?
#include
int main()
{
SponsoredLinks
Search YourJobs
Social
Search
25th September 2014 | Thursday Walk-ins in Hyderabad for All Graduates25th September 2014 | Thursday Walk-ins in Delhi, Mumbai for All Graduates
Walkins Software Jobs Freshers Off Campus Govt Jobs TOP MNC Jobs Link Solved Placement Papers Submit Your Resume
9/24/2014 C Programming- While Loops | C Programming Interview Questions and Answers | Freshers Jobs | Walkins | Offcampus | Placement Papers | Fresher…
http://www.freshershine.com/mock-test/c-programming/c-programming-while-loops-c-programming-interview-questions-and-answers/ 2/7
In while loop
In while loop after loop
After loop
Infinite loop
Question 3 WRONG
In while loop In while loop In while loop
In while loop In while loop
Depends on the compiler
Compile time error
Question 4 WRONG
2
3
4
do
printf("In while loop ");
while (0);
printf("After loopn");
}
What is the output of this C code?
#include
int main()
{
int i = 0;
do {
i++;
printf("In while loopn");
} while (i < 3);
}
How many times i value is checked in the below code?
#include
int main()
{
int i = 0;
do {
i++;
printf("in while loopn");
} while (i < 3);
}
GetFreeJobUpdates
Followuson Google+
Finduson Facebook
Subscribe to our free & latest job updates by
email.
Enter your e-mail address
Freshershine
35,782 people like Freshershine.
Facebook social plugin
Like
A ds by O ffersWizard A d O ptions
    
Subscribe
FresherShine Jo…
Follow

9/24/2014 C Programming- While Loops | C Programming Interview Questions and Answers | Freshers Jobs | Walkins | Offcampus | Placement Papers | Fresher…
http://www.freshershine.com/mock-test/c-programming/c-programming-while-loops-c-programming-interview-questions-and-answers/ 3/7
1
Question 5 WRONG
2
3
4
1
Question 6 WRONG
Compile time error
Hi Hi
Hi
Varies
Question 7 WRONG
How many times i value is checked in the below code?
#include
int main()
{
int i = 0;
while (i < 3)
i++;
printf("In while loopn");
}
What is the output of this C code?
#include
void main()
{
int i = 2;
do
{
printf("Hi");
} while (i < 2)
}
What is the output of this C code?
#include
void main()
{
int i = 0;
while (++i)
{
printf("H");
}
A ds by O ffersWizard A d O ptions
9/24/2014 C Programming- While Loops | C Programming Interview Questions and Answers | Freshers Jobs | Walkins | Offcampus | Placement Papers | Fresher…
http://www.freshershine.com/mock-test/c-programming/c-programming-while-loops-c-programming-interview-questions-and-answers/ 4/7
H
H is printed infinite times
Compile time error
Varies
Question 8 WRONG
Nothing
H is printed infinite times
Hello
Run time error
Question 9 WRONG
Nothing
Run time error
Varies
Hello is printed infinite times
}
What is the output of this C code?
#include
void main()
{
int i = 0;
do
{
printf("Hello");
} while (i != 0);
}
What is the output of this C code?
#include
void main()
{
char *str = "";
do
{
printf("hello");
} while (str);
}
A ds by O ffersWizard A d O ptions
9/24/2014 C Programming- While Loops | C Programming Interview Questions and Answers | Freshers Jobs | Walkins | Offcampus | Placement Papers | Fresher…
http://www.freshershine.com/mock-test/c-programming/c-programming-while-loops-c-programming-interview-questions-and-answers/ 5/7
Question 10 WRONG
Hi is printed 8 times, hello 7 times and then hi 2 times
Hi is printed 10 times, hello 7 times
Hi is printed once, hello 7 times
Hi is printed once, hello 7 times and then hi 2 times
Question 11 WRONG
for
while
do-while
All of the mentioned
Question 12 WRONG
n, n
n, n+1
n+1, n
n+1, n+1
Question 13 WRONG
What is the output of this C code?
#include
void main()
{
int i = 0;
while (i < 10)
{
i++;
printf("hin");
} while (i < 8)
i++;
printf("hellon");
}
Example of iteration in C.
Number of times while loop condition is tested is, i is initialized to 0 in both
case. while (i < n) i++; ------------- do i++; while (i <= n);
What is the output of this C code?
#include
A ds by O ffersWizard A d O ptions
9/24/2014 C Programming- While Loops | C Programming Interview Questions and Answers | Freshers Jobs | Walkins | Offcampus | Placement Papers | Fresher…
http://www.freshershine.com/mock-test/c-programming/c-programming-while-loops-c-programming-interview-questions-and-answers/ 6/7
True (infinite time)
True (1 time) False
False
Compiler dependent
Question 14 WRONG
5, 5
5, 10
10, 10
Syntax error
Question 15 WRONG
for loop
while loop
do-while loop
None of the mentioned
int main()
{
int i = 0;
while (i = 0)
printf("Truen");
printf("Falsen");
}
What is the output of this C code?
#include
int main()
{
int i = 0, j = 0;
while (i < 5, j < 10)
{
i++;
j++;
}
printf("%d, %dn", i, j);
}
Which loop is most suitable to first perform the operation and then test the
condition?
A ds by O ffersWizard A d O ptions
9/24/2014 C Programming- While Loops | C Programming Interview Questions and Answers | Freshers Jobs | Walkins | Offcampus | Placement Papers | Fresher…
http://www.freshershine.com/mock-test/c-programming/c-programming-while-loops-c-programming-interview-questions-and-answers/ 7/7
Ad by DeleteAd | Close Ad by DeleteAd | Close
RelatedArticles
C Programming – Sizeof
October 9, 2013
C Programming – Float
Datatype
October 9, 2013
C Programming – Random
Number Generation
October 9, 2013
C Programming – Ungetc
October 9, 2013
C Programming –
Mathematical Functions
October 9, 2013
Share ! Tweet 0 01Like Share
Previous:
Tech Mahindra Placement Paper Fully
Solved-4
« Next:
C Programming- Break and Continue |
C Programming Interview Questions
and Answers
»
© 2014 FresherShine.com     
A ds by O ffersWizard A d O ptions

More Related Content

Viewers also liked

Classical programming interview questions
Classical programming interview questionsClassical programming interview questions
Classical programming interview questions
Gradeup
 
20 most important java programming interview questions
20 most important java programming interview questions20 most important java programming interview questions
20 most important java programming interview questions
Gradeup
 
Interview tips for web designers
Interview tips  for web designersInterview tips  for web designers
Interview tips for web designers
Bapu Graphics India
 
Top 10 database interview questions with answers
Top 10 database interview questions with answersTop 10 database interview questions with answers
Top 10 database interview questions with answers
brownmichael495
 
Job Interview Question Database With Answers
Job Interview Question Database With AnswersJob Interview Question Database With Answers
Job Interview Question Database With Answers
cstedham
 
Responsive web designing ppt(1)
Responsive web designing ppt(1)Responsive web designing ppt(1)
Responsive web designing ppt(1)
admecindia1
 
C programming interview questions
C programming interview questionsC programming interview questions
C programming interview questions
adarshynl
 
Tell Me About Yourself
Tell Me About YourselfTell Me About Yourself
Tell Me About Yourself
guest576f22f
 
Sql Server Interview Question
Sql Server Interview QuestionSql Server Interview Question
Sql Server Interview Question
pukal rani
 
Top 100 Linux Interview Questions and Answers 2014
Top 100 Linux Interview Questions and Answers 2014Top 100 Linux Interview Questions and Answers 2014
Top 100 Linux Interview Questions and Answers 2014
iimjobs and hirist
 
User Interview Techniques
User Interview TechniquesUser Interview Techniques
User Interview Techniques
Liz Danzico
 

Viewers also liked (11)

Classical programming interview questions
Classical programming interview questionsClassical programming interview questions
Classical programming interview questions
 
20 most important java programming interview questions
20 most important java programming interview questions20 most important java programming interview questions
20 most important java programming interview questions
 
Interview tips for web designers
Interview tips  for web designersInterview tips  for web designers
Interview tips for web designers
 
Top 10 database interview questions with answers
Top 10 database interview questions with answersTop 10 database interview questions with answers
Top 10 database interview questions with answers
 
Job Interview Question Database With Answers
Job Interview Question Database With AnswersJob Interview Question Database With Answers
Job Interview Question Database With Answers
 
Responsive web designing ppt(1)
Responsive web designing ppt(1)Responsive web designing ppt(1)
Responsive web designing ppt(1)
 
C programming interview questions
C programming interview questionsC programming interview questions
C programming interview questions
 
Tell Me About Yourself
Tell Me About YourselfTell Me About Yourself
Tell Me About Yourself
 
Sql Server Interview Question
Sql Server Interview QuestionSql Server Interview Question
Sql Server Interview Question
 
Top 100 Linux Interview Questions and Answers 2014
Top 100 Linux Interview Questions and Answers 2014Top 100 Linux Interview Questions and Answers 2014
Top 100 Linux Interview Questions and Answers 2014
 
User Interview Techniques
User Interview TechniquesUser Interview Techniques
User Interview Techniques
 

Similar to C programming while loops

Week2 ch4 part1edited 2020
Week2 ch4 part1edited 2020Week2 ch4 part1edited 2020
Week2 ch4 part1edited 2020
Osama Ghandour Geris
 
Week2 ch4 part1edited 2020
Week2 ch4 part1edited 2020Week2 ch4 part1edited 2020
Week2 ch4 part1edited 2020
Osama Ghandour Geris
 
CP Handout#5
CP Handout#5CP Handout#5
CP Handout#5
trupti1976
 
Programming basics
Programming basicsProgramming basics
Programming basics
246paa
 
Different loops in C
Different loops in CDifferent loops in C
Different loops in C
Md. Arif Hossain
 
1 introducing c language
1  introducing c language1  introducing c language
1 introducing c language
MomenMostafa
 
Loops in c
Loops in cLoops in c
Loops in c
shubhampandav3
 
C decision making and looping.
C decision making and looping.C decision making and looping.
C decision making and looping.
Haard Shah
 
Acm aleppo cpc training introduction 1
Acm aleppo cpc training introduction 1Acm aleppo cpc training introduction 1
Acm aleppo cpc training introduction 1
Ahmad Bashar Eter
 
Cracking OCA and OCP Java 8 Exams
Cracking OCA and OCP Java 8 ExamsCracking OCA and OCP Java 8 Exams
Cracking OCA and OCP Java 8 Exams
Ganesh Samarthyam
 
CSEG1001Unit 2 C Programming Fundamentals
CSEG1001Unit 2 C Programming FundamentalsCSEG1001Unit 2 C Programming Fundamentals
CSEG1001Unit 2 C Programming Fundamentals
Dhiviya Rose
 
Fundamental of Information Technology - UNIT 8
Fundamental of Information Technology - UNIT 8Fundamental of Information Technology - UNIT 8
Fundamental of Information Technology - UNIT 8
Shipra Swati
 
Critical software developement
Critical software developementCritical software developement
Critical software developement
nedseb
 
02 Control Structures - Loops & Conditions
02 Control Structures - Loops & Conditions02 Control Structures - Loops & Conditions
02 Control Structures - Loops & Conditions
Ebad ullah Qureshi
 
C Basics
C BasicsC Basics
C Basics
Sunil OS
 
Technical aptitude Test 1 CSE
Technical aptitude Test 1 CSETechnical aptitude Test 1 CSE
Technical aptitude Test 1 CSE
Sujata Regoti
 
lec7-program-verification.pdf
lec7-program-verification.pdflec7-program-verification.pdf
lec7-program-verification.pdf
farouqalfuhidi
 
F# for BLOBA, by brandon d'imperio
F# for BLOBA, by brandon d'imperioF# for BLOBA, by brandon d'imperio
F# for BLOBA, by brandon d'imperio
MaslowB
 

Similar to C programming while loops (20)

Week2 ch4 part1edited 2020
Week2 ch4 part1edited 2020Week2 ch4 part1edited 2020
Week2 ch4 part1edited 2020
 
Week2 ch4 part1edited 2020
Week2 ch4 part1edited 2020Week2 ch4 part1edited 2020
Week2 ch4 part1edited 2020
 
CP Handout#5
CP Handout#5CP Handout#5
CP Handout#5
 
Programming basics
Programming basicsProgramming basics
Programming basics
 
Different loops in C
Different loops in CDifferent loops in C
Different loops in C
 
Elements of programming
Elements of programmingElements of programming
Elements of programming
 
1 introducing c language
1  introducing c language1  introducing c language
1 introducing c language
 
Loops in c
Loops in cLoops in c
Loops in c
 
C decision making and looping.
C decision making and looping.C decision making and looping.
C decision making and looping.
 
Loops in c
Loops in cLoops in c
Loops in c
 
Acm aleppo cpc training introduction 1
Acm aleppo cpc training introduction 1Acm aleppo cpc training introduction 1
Acm aleppo cpc training introduction 1
 
Cracking OCA and OCP Java 8 Exams
Cracking OCA and OCP Java 8 ExamsCracking OCA and OCP Java 8 Exams
Cracking OCA and OCP Java 8 Exams
 
CSEG1001Unit 2 C Programming Fundamentals
CSEG1001Unit 2 C Programming FundamentalsCSEG1001Unit 2 C Programming Fundamentals
CSEG1001Unit 2 C Programming Fundamentals
 
Fundamental of Information Technology - UNIT 8
Fundamental of Information Technology - UNIT 8Fundamental of Information Technology - UNIT 8
Fundamental of Information Technology - UNIT 8
 
Critical software developement
Critical software developementCritical software developement
Critical software developement
 
02 Control Structures - Loops & Conditions
02 Control Structures - Loops & Conditions02 Control Structures - Loops & Conditions
02 Control Structures - Loops & Conditions
 
C Basics
C BasicsC Basics
C Basics
 
Technical aptitude Test 1 CSE
Technical aptitude Test 1 CSETechnical aptitude Test 1 CSE
Technical aptitude Test 1 CSE
 
lec7-program-verification.pdf
lec7-program-verification.pdflec7-program-verification.pdf
lec7-program-verification.pdf
 
F# for BLOBA, by brandon d'imperio
F# for BLOBA, by brandon d'imperioF# for BLOBA, by brandon d'imperio
F# for BLOBA, by brandon d'imperio
 

More from Neelam Rawat

Big data-analytics-cpe8035
Big data-analytics-cpe8035Big data-analytics-cpe8035
Big data-analytics-cpe8035
Neelam Rawat
 
Unit 2
Unit 2Unit 2
Unit 2
Neelam Rawat
 
Unit 1
Unit 1Unit 1
Unit 1
Neelam Rawat
 
Unit 1
Unit 1Unit 1
Unit 1
Neelam Rawat
 
Syllabus
SyllabusSyllabus
Syllabus
Neelam Rawat
 
Opportunity
OpportunityOpportunity
Opportunity
Neelam Rawat
 
Opportunity
OpportunityOpportunity
Opportunity
Neelam Rawat
 
Unit 1 &amp; 2
Unit 1 &amp; 2Unit 1 &amp; 2
Unit 1 &amp; 2
Neelam Rawat
 
Unit 1 overview
Unit 1 overviewUnit 1 overview
Unit 1 overview
Neelam Rawat
 

More from Neelam Rawat (9)

Big data-analytics-cpe8035
Big data-analytics-cpe8035Big data-analytics-cpe8035
Big data-analytics-cpe8035
 
Unit 2
Unit 2Unit 2
Unit 2
 
Unit 1
Unit 1Unit 1
Unit 1
 
Unit 1
Unit 1Unit 1
Unit 1
 
Syllabus
SyllabusSyllabus
Syllabus
 
Opportunity
OpportunityOpportunity
Opportunity
 
Opportunity
OpportunityOpportunity
Opportunity
 
Unit 1 &amp; 2
Unit 1 &amp; 2Unit 1 &amp; 2
Unit 1 &amp; 2
 
Unit 1 overview
Unit 1 overviewUnit 1 overview
Unit 1 overview
 

Recently uploaded

South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
ShivajiThube2
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 

Recently uploaded (20)

South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 

C programming while loops

  • 1. 9/24/2014 C Programming- While Loops | C Programming Interview Questions and Answers | Freshers Jobs | Walkins | Offcampus | Placement Papers | Fresher… http://www.freshershine.com/mock-test/c-programming/c-programming-while-loops-c-programming-interview-questions-and-answers/ 1/7 Jobs Latest A ds by O ffersWizard A d O ptions Question 1 WRONG In while loop after loop After loop Compile time error Infinite loop Question 2 WRONG Home > Mock Test > C Programming > C Programming- While Loops | C Programming Interview Questions and Answers CProgramming- WhileLoops|CProgrammingInterviewQuestions andAnswers C Programming- While Loops Congratulations - you have completed C Programming- While Loops. You scored 0 out of 15. Your performance has been rated as Need more practice! Your answers are highlighted below. What is the output of this C code? #include int main() { while () printf("In while loop "); printf("After loopn"); } What is the output of this C code? #include int main() { SponsoredLinks Search YourJobs Social Search 25th September 2014 | Thursday Walk-ins in Hyderabad for All Graduates25th September 2014 | Thursday Walk-ins in Delhi, Mumbai for All Graduates Walkins Software Jobs Freshers Off Campus Govt Jobs TOP MNC Jobs Link Solved Placement Papers Submit Your Resume
  • 2. 9/24/2014 C Programming- While Loops | C Programming Interview Questions and Answers | Freshers Jobs | Walkins | Offcampus | Placement Papers | Fresher… http://www.freshershine.com/mock-test/c-programming/c-programming-while-loops-c-programming-interview-questions-and-answers/ 2/7 In while loop In while loop after loop After loop Infinite loop Question 3 WRONG In while loop In while loop In while loop In while loop In while loop Depends on the compiler Compile time error Question 4 WRONG 2 3 4 do printf("In while loop "); while (0); printf("After loopn"); } What is the output of this C code? #include int main() { int i = 0; do { i++; printf("In while loopn"); } while (i < 3); } How many times i value is checked in the below code? #include int main() { int i = 0; do { i++; printf("in while loopn"); } while (i < 3); } GetFreeJobUpdates Followuson Google+ Finduson Facebook Subscribe to our free & latest job updates by email. Enter your e-mail address Freshershine 35,782 people like Freshershine. Facebook social plugin Like A ds by O ffersWizard A d O ptions      Subscribe FresherShine Jo… Follow 
  • 3. 9/24/2014 C Programming- While Loops | C Programming Interview Questions and Answers | Freshers Jobs | Walkins | Offcampus | Placement Papers | Fresher… http://www.freshershine.com/mock-test/c-programming/c-programming-while-loops-c-programming-interview-questions-and-answers/ 3/7 1 Question 5 WRONG 2 3 4 1 Question 6 WRONG Compile time error Hi Hi Hi Varies Question 7 WRONG How many times i value is checked in the below code? #include int main() { int i = 0; while (i < 3) i++; printf("In while loopn"); } What is the output of this C code? #include void main() { int i = 2; do { printf("Hi"); } while (i < 2) } What is the output of this C code? #include void main() { int i = 0; while (++i) { printf("H"); } A ds by O ffersWizard A d O ptions
  • 4. 9/24/2014 C Programming- While Loops | C Programming Interview Questions and Answers | Freshers Jobs | Walkins | Offcampus | Placement Papers | Fresher… http://www.freshershine.com/mock-test/c-programming/c-programming-while-loops-c-programming-interview-questions-and-answers/ 4/7 H H is printed infinite times Compile time error Varies Question 8 WRONG Nothing H is printed infinite times Hello Run time error Question 9 WRONG Nothing Run time error Varies Hello is printed infinite times } What is the output of this C code? #include void main() { int i = 0; do { printf("Hello"); } while (i != 0); } What is the output of this C code? #include void main() { char *str = ""; do { printf("hello"); } while (str); } A ds by O ffersWizard A d O ptions
  • 5. 9/24/2014 C Programming- While Loops | C Programming Interview Questions and Answers | Freshers Jobs | Walkins | Offcampus | Placement Papers | Fresher… http://www.freshershine.com/mock-test/c-programming/c-programming-while-loops-c-programming-interview-questions-and-answers/ 5/7 Question 10 WRONG Hi is printed 8 times, hello 7 times and then hi 2 times Hi is printed 10 times, hello 7 times Hi is printed once, hello 7 times Hi is printed once, hello 7 times and then hi 2 times Question 11 WRONG for while do-while All of the mentioned Question 12 WRONG n, n n, n+1 n+1, n n+1, n+1 Question 13 WRONG What is the output of this C code? #include void main() { int i = 0; while (i < 10) { i++; printf("hin"); } while (i < 8) i++; printf("hellon"); } Example of iteration in C. Number of times while loop condition is tested is, i is initialized to 0 in both case. while (i < n) i++; ------------- do i++; while (i <= n); What is the output of this C code? #include A ds by O ffersWizard A d O ptions
  • 6. 9/24/2014 C Programming- While Loops | C Programming Interview Questions and Answers | Freshers Jobs | Walkins | Offcampus | Placement Papers | Fresher… http://www.freshershine.com/mock-test/c-programming/c-programming-while-loops-c-programming-interview-questions-and-answers/ 6/7 True (infinite time) True (1 time) False False Compiler dependent Question 14 WRONG 5, 5 5, 10 10, 10 Syntax error Question 15 WRONG for loop while loop do-while loop None of the mentioned int main() { int i = 0; while (i = 0) printf("Truen"); printf("Falsen"); } What is the output of this C code? #include int main() { int i = 0, j = 0; while (i < 5, j < 10) { i++; j++; } printf("%d, %dn", i, j); } Which loop is most suitable to first perform the operation and then test the condition? A ds by O ffersWizard A d O ptions
  • 7. 9/24/2014 C Programming- While Loops | C Programming Interview Questions and Answers | Freshers Jobs | Walkins | Offcampus | Placement Papers | Fresher… http://www.freshershine.com/mock-test/c-programming/c-programming-while-loops-c-programming-interview-questions-and-answers/ 7/7 Ad by DeleteAd | Close Ad by DeleteAd | Close RelatedArticles C Programming – Sizeof October 9, 2013 C Programming – Float Datatype October 9, 2013 C Programming – Random Number Generation October 9, 2013 C Programming – Ungetc October 9, 2013 C Programming – Mathematical Functions October 9, 2013 Share ! Tweet 0 01Like Share Previous: Tech Mahindra Placement Paper Fully Solved-4 « Next: C Programming- Break and Continue | C Programming Interview Questions and Answers » © 2014 FresherShine.com      A ds by O ffersWizard A d O ptions