• Study Materials – Company wise
    • Infosys Archive
    • Accenture Archive
    • AMCAT Archive
    • Capgemini Archive
    • Cisco Archive
    • CoCubes Archive
    • Cognizant(CTS) Archive
    • Dell Archive
    • Deloitte Archive
    • DXC Archive
    • Goldman Sachs Archive
    • Hexaware Technologies Archive
    • LTI Archive
    • MindTree Archive
    • TCS Archive
    • Virtusa Archive
    • Wipro Archive
  • Interview Preparation – E Books
    • C Interview Questions
    • Data Structures Interview Questions
    • DBMS Interview Questions
    • HR Interview Questions
    • Java Interview Questions
    • Operating System Interview Questions
    • Python Interview Questions
    • SQL Query Interview Questions
  • Programming
    • C Programming MCQs
    • C Code Snippets – Output Questions
    • Python Code Snippets – Output Questions
  • Aptitude
    • Verbal Ability for Placements
    • Quant for Placements
  • Register
  • Login
CODE OF GEEKS

We at CODE OF GEEKS, aim at providing best and quality content for our users at no extra cost.

    • Study Materials – Company wise
      • Infosys Archive
      • Accenture Archive
      • AMCAT Archive
      • Capgemini Archive
      • Cisco Archive
      • CoCubes Archive
      • Cognizant(CTS) Archive
      • Dell Archive
      • Deloitte Archive
      • DXC Archive
      • Goldman Sachs Archive
      • Hexaware Technologies Archive
      • LTI Archive
      • MindTree Archive
      • TCS Archive
      • Virtusa Archive
      • Wipro Archive
    • Interview Preparation – E Books
      • C Interview Questions
      • Data Structures Interview Questions
      • DBMS Interview Questions
      • HR Interview Questions
      • Java Interview Questions
      • Operating System Interview Questions
      • Python Interview Questions
      • SQL Query Interview Questions
    • Programming
      • C Programming MCQs
      • C Code Snippets – Output Questions
      • Python Code Snippets – Output Questions
    • Aptitude
      • Verbal Ability for Placements
      • Quant for Placements
    • Register
    • Login
  • [email protected]
  • ..
Login / Register
Apply Now
CODE OF GEEKS
CODE OF GEEKS
  • Study Materials – Company wise
    • Infosys Archive
    • Accenture Archive
    • AMCAT Archive
    • Capgemini Archive
    • Cisco Archive
    • CoCubes Archive
    • Cognizant(CTS) Archive
    • Dell Archive
    • Deloitte Archive
    • DXC Archive
    • Goldman Sachs Archive
    • Hexaware Technologies Archive
    • LTI Archive
    • MindTree Archive
    • TCS Archive
    • Virtusa Archive
    • Wipro Archive
  • Interview Preparation – E Books
    • C Interview Questions
    • Data Structures Interview Questions
    • DBMS Interview Questions
    • HR Interview Questions
    • Java Interview Questions
    • Operating System Interview Questions
    • Python Interview Questions
    • SQL Query Interview Questions
  • Programming
    • C Programming MCQs
    • C Code Snippets – Output Questions
    • Python Code Snippets – Output Questions
  • Aptitude
    • Verbal Ability for Placements
    • Quant for Placements
  • Register
  • Login

Cart

100+ C Output Questions with Explanation

  • September 24, 2020
  • CODE OF GEEKS
  • 0

55. What will be the output of following code :

// Assume all header files are included

main()
{
int i = 3;
for (;i++=0;) printf(“%d”,i);
} 

A. 89
B. 0
C. compile time error
D. Runtime Error

View Answer & Explanation

Ans. c

Explanation : As we know that increment operators return rvalues and hence it cannot appear on the left hand side of an assignment operation.

56. What will be the output of following code :

// Assume all header files are included

void main()
{
static int i;
while(i<=10)
(i>2)?i++:i--;
 printf(“%d”, i);
} 

A. 32768
B. 32767
C. compile time error
D. Runtime Error

View Answer & Explanation

Ans. b

Explanation : Since i is static it is initialized to 0. Inside the while loop the conditional operator evaluates to false, executing i–. This continues till the integer value rotates to positive value (32767)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  • Previous Infosys Online Test On-campus New Pattern 2020 | Syllabus | Difficulty level
  • Next Word Analogy- Verbal Ability

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Best Deals on Amazon

Study Materials : Company Wise

Verbal Ability for Placements

Xplore us

Recent Posts

Introduction to Functions in Python with Example
return Statement in Python with Example
assert Statement in Python with Example
pass Statement in Python

Popular Tags

codevita codevita interview experience 2019 codevita interview questions hackwithinfy coding problems hack with infy coding questions hackwithinfy coding questions Infosys 8 lpa Interview infosys infytq experience infosys infytq interview experience infosys interview experience infosys last year handson problems Infosys Power Programmer Interview Experience infytq infytq exam infytq exam experience infytq examination infytq experience infytq handson problems last year infytq handson problems of last year infytq handson questions infytq interview experience infytq last year problems infytq last year questions interview interview certification exam experience interview experience infy interview experience infytq language Last year questions Infytq power programmer interview experience practice infy prepare infytq question questions ses interview experience tcs tcscodevita tcs codevita 2019 coding questions tcs codevita 2020 tcs codevita coding questions tcs codevita experience tcs codevita interview experience tcs codevita interview experience 2019 tcs codevita interview questions tcs codevita last year coding questions 2019 tcs codevita questions 2019
CODE OF GEEKS

Subscribe to Newsletter

CODE OF GEEKS

Learn | Code | Achieve

Reach us

[email protected]
We at CODE OF GEEKS, aim at providing quality content to our users at no cost.
CODE OF GEEKS

Important Pages

About us
Advertise
Privacy Policy
Terms and Conditions

Placements – Study Materials

TCS NQT     Wipro     CapGemini
Accenture     MindTree     CTS
DXC     Hexaware Technologies     AMCAT
CoCubes     Goldman Sachs     Dell
Cisco     Deloitte     Virtusa     LTI     Infosys   

Courses

  • Mail Us
  • Login/Register

Recent Posts

Introduction to Functions in Python with Example
  • November 28, 2021
return Statement in Python with Example
  • November 27, 2021

Copyright 2021 CODE OF GEEKS. All Rights Reserved.

  • →