AmbitionBox
Discover Best Places to work in India
Discover best places to work
Compare & find best workplace
Bring your workplace to life
Highlight your company's perks
Read reviews for 6L+ companies
Rate your former or current company
Discover salaries for 8L+ companies
Calculate your take home salary
Check your market value
Help other jobseekers
Read interviews for 90K+ companies
Interviews questions for 1K+ colleges
Contribute your interview questions
C Programming
How many times "Ambition Box" is get printed?
#includeint main() { int x; for(x=-1; x<=10; x++) { if(x < 5) continue; elsebreak; printf("Ambition Box"); } return0; }
Infinite times
11 times
0 times
10 times
Option C
How many times the while loop will get executed if a short int is 2 byte wide?
#includeint main() { int j=1; while(j <= 255) { printf("%c %d\n", j, j); j++; } return0; }
255 times
256 times
254 times
Answer :
Option B
Explanation :
The while(j <= 255) loop will get executed 255 times. The size short int(2 byte wide) does not affect the while() loop.
Join India’s largest community to research company culture
Are you a student or working professional?
Student/Never worked
I am a student/I have never worked
Working Professional
I am working/I have worked before
What are your preferred job locations?
Popular Cities
Other Cities
Follow your preferred designations/job profiles
Suggestions based on your job profile
vs
Similar Companies