Buy Discounted Microsoft Exam Voucher
Rs. 5600
OFFER PRICE Rs. 4250/- | Contact: +91 9347458388
Azure Certification
NewBatches/Webinars
Packages
Gold Membership
Bestseller
Microsoft Azure Suite & Suite Plus
Azure DevOps Expert & Expert Plus
MS.NET Foundation For Beginners
MS.NET Full Stack Developer
UI / Web Development
SQL Server & MSBI Tools
Software Testing
Courses
MS.NET Courses (Includes Live Project)
Complete C#, OOPs and Windows Programing
ASP.NET MVC Online Training
ASP.NET WebForms
ASP.NET Core
WCF incl. Web Services and Remoting
WPF incl. MVVM and Prism
LINQ and Entity Framework
Live Project Training for Developing Enterprise Application
Live Project using Ntier Arch (.NET5 + EF Core + Angular)
Gold Membership
CareerStep IT Program
Client-side UI Technologies
Building Static Web Pages using HTML and CSS
JavaScript and HTML DOM
jQuery, AJAX and JSON
Building Interactive Web Pages using HTML5 and CSS3
BootStrap + Live Examples
AngularJS + Live Project
Angular + Typescript
ReactJS
KnockoutJS
Xamarin
SQL Server + MSBI
SQL Server 2017
Querying Data with Transact-SQL(70-761)
SQL Server Integration Service (SSIS)
SQL Server Reporting Service (SSRS)
SQL Service Analysis Service (SSAS)
Cloud Computing / Azure / AWS
AZ-900: Microsoft Azure Fundamentals
Azure Suite (AZ-104+AZ-204+AZ-305+ AZ-500)
AZ-104: Microsoft Azure Administrator
AZ-204: Developing Solutions for Microsoft Azure
AZ-305: Microsoft Azure Architect Technologies and Design
AZ-400: Microsoft Azure DevOps
DP-203: Data Engineering on Microsoft Azure
Amazon Web Services (AWS)
Testing Tools
Manual Testing
Selenium Testing with Java(Live Training)
SharePoint
SharePoint 2013
Microsoft Power Platform
Power Platform Suite
Data Analytics using PowerBI (DA-100)
MicroServices
Docker
Kubernetes
Microservices using .NET Core
Others
C and Data Structure
Core Java
OOPs and C++
Advance Java
Python Programming
Complete Azure Training
Pricing
Videos
Resources
AzureA2Z
Deccansoft
Blog
On-Job Tech Support
Wall of Fame
Testimonials
Contact Us
Login
Login or Register
×
Sign In
Register
Forgot Password?
How did you find us
WhatsApp
YouTube
LinkedIn
Facebook
Telegram
Twitter
Google
Referred by Friend
Refresh
Input symbols
By clicking Register, you accept to the
terms and conditions
and that you have read our
privacy policy.
Recover Password
×
Submit
Enquiry Now
Where did you come to know about us
WhatsApp
YouTube
LinkedIn
Facebook
LinkedIn Ad
Email
Twitter
Google
Referred
Other
Refresh
Input symbols
Control Flow Statements
Interview Questions and Answer
1. How many times will this loop execute? main() { char c=125; do printf("%d ",c); while(c++); }
Options:
a. 3 times
b. Single time
c. Char is wrong
d. Finite times
Reveal Answer
2. _____ Statement execute the body of the loop before the test is performed.
Options:
a. If
b. do
c. While
d. For
Reveal Answer
3. What is the o/p of following program #include<stdio.h> int main(){ float a=1.5f; while(a){ printf("%.f ",a); a-=.5f; } return 0; }
Options:
a. 2 1 1
b. 0 1 2
c. No output
d. Compilation Error
Reveal Answer
4. While loop without any body is possible. For example: #include<stdio.h> int main() { int i=0; while(i<=8) i++; printf("%d ",i); return 0; }
Options:
a. 1
b. 8
c. 9
d. No output
Reveal Answer
5. What will be output of following c code? #include<stdio.h> int main(){ int i=2,j=2; while(i+1?--i:j++) printf("%d",i); return 0; }
Options:
a. 1
b. 2 3
c. 1 2
d. 0 1
Reveal Answer
6. What will be output of the following code? #include<stdio.h> int main() { unsigned int i = 65535; /* Assume 2 byte integer and 65535 is the max value*/ while(i++ != 0) printf("%d",++i); printf("\n"); return 0; }
Options:
a. Infinity
b. 0 1 2 ... 65535
c. 0 1 2 ... 32767 - 32766 -32765 -1 0
d. No output
Reveal Answer
7. What will be the output of the program? #include<stdio.h> int main() { int i = 5; while(i-- >= 0) printf("%d,", i); i = 5; printf("\n"); while(i-- >= 0) printf("%i,", i); while(i-- >= 0) printf("%d,", i); return 0; }
Options:
a. 4, 3, 2, 1, 0, -1 4, 3, 2, 1, 0, -1
b. 5, 4, 3, 2, 1, 0 5, 4, 3, 2, 1, 0
c. Error
d. 5, 4, 3, 2, 1, 0 5, 4, 3, 2, 1, 0 5, 4, 3, 2, 1, 0
Reveal Answer
8. Point out the error, if any in the while loop. #include<stdio.h> int main() { int i=1; while() { printf("%d\n", i++); if(i>10) break; } return 0; }
Options:
a. There should be a condition in the while loop
b. There should be at least a semicolon in the while
c. The while loop should be replaced with for loop
d. No error
Reveal Answer
9. What is the o/p of following program #include <stdio.h> int main() { int i=0; while(i < 10) { i++; if (i == 6) continue; if (i == 8) break; printf("%d\n",i); } }
Options:
a. 0 1 2 3 4 5 6 7 8 9
b. 1 2 3 4 5 6 7 8 9
c. 1 2 3 4 5 7
d. 1 2 3 4 5 6 7
Reveal Answer
10. What will be output of following c code? #include<stdio.h> int main(){ int i=1; for(i=0;i=-1;i=1) { printf("%d ",i); if(i!=1) break; } return 0; }
Options:
a. 1
b. 0
c. -1
d. Compilation Error
Reveal Answer
11. What is the o/p of following code #include<stdio.h> int main() { for (int i=0;i<3;i++) { for(int j=0;j<3;j++) { if (i == j) break; printf("%d %d - ",i,j); } } }
Options:
a. 0 0 – 0 1 – 0 2 – 1 0 – 1 1 – 1 2 – 2 0 – 2 1 – 2 2 -
b. 1 0 - 2 0 – 2 1 -
c. 0 1 – 0 2 – 1 0 –1 2 – 2 0 – 2 1 -
d. No Output
Reveal Answer
12. What will be the output? #include<stdio.h> int main() { int i=1; for(i=0; i <= 3; i++) { printf("%d ",i); if(i == 2) break; } }
Options:
a. 0 1 2 3
b. 0 1 2
c. 1
d. 1 2 3
Reveal Answer
13. What will be the output? #include<stdio.h> int main() { int i=1; for(i=0;i=-1;i=1) { printf("%d ",i); if(i != 1) break; } }
Options:
a. 0
b. 1
c. -1
d. Compilation Error
Reveal Answer
14. What will be the output of the program? #include<stdio.h> int main() { int i=0; for(; i <= 5; i++); printf("%d", i); }
Options:
a. 0, 1, 2, 3, 4, 5
b. 5
c. 1, 2, 3, 4
d. 6
Reveal Answer
Packages
Gold Membership
Microsoft Azure Suite &Suite Plus
Azure DevOps Expert &Expert Plus
MS.NET Foundation For Beginners
MS.NET Full Stack Developer
UI / Web Development
SQL Server & MSBI Tools
Software Testing
Resources
Blog
Deccansoft
AzureA2Z
Wall of Fame
On-Job Tech Support
About
About BestDotNetTraining
About Trainer
Testimonials
FAQ
Other links
About Us
Contact Us
Leave us a feedback
Sitemap
Privacy Policy
Terms & Conditions
Proudly Powered by