Output of C programs | Set 55 (Ternary Operators) - GeeksforGeeks Skip to content Courses For Working Professionals LIVE DSA Live Classes System Design Java Backend Development Full Stack LIVE Explore More Self-Paced DSA- Self Paced SDE Theory All Development Courses Explore More For Students LIVE Competitive Programming GATE Live Course 2023 Data Science Explore More Self-Paced DSA- Self Paced CIP JAVA / Python / C++ Explore More School Courses School Guide Python Programming Learn To Make Apps Explore more All Courses Tutorials Algorithms Analysis of Algorithms Asymptotic Analysis Worst, Average and Best Cases Asymptotic Notations Little o and little omega notations Lower and Upper Bound Theory Analysis of Loops Solving Recurrences Amortized Analysis What does 'Space Complexity' mean ? Pseudo-polynomial Algorithms Polynomial Time Approximation Scheme A Time Complexity Question Searching Algorithms Sorting Algorithms Graph Algorithms Pattern Searching Geometric Algorithms Mathematical Bitwise Algorithms Randomized Algorithms Greedy Algorithms Dynamic Programming Divide and Conquer Backtracking Branch and Bound All Algorithms Data Structures Arrays Linked List Stack Queue Binary Tree Binary Search Tree Heap Hashing Graph Advanced Data Structure Matrix Strings All Data Structures Interview Corner Company Preparation Top Topics Practice Company Questions Interview Experiences Experienced Interviews Internship Interviews Competititve Programming Design Patterns System Design Tutorial Multiple Choice Quizzes Languages C C++ Java Python C# HTML JavaScript PHP SQL Scala Perl Go Language Kotlin ML & Data Science Machine Learning Data Science CS Subjects Mathematics Operating System DBMS Computer Networks Computer Organization and Architecture Theory of Computation Compiler Design Digital Logic Software Engineering GATE GATE Computer Science Notes Last Minute Notes GATE CS Solved Papers GATE CS Original Papers and Official Keys GATE 2021 Dates GATE CS 2021 Syllabus Important Topics for GATE CS Web Development HTML CSS JavaScript PHP CSS Frameworks Bootstrap Tailwind CSS Foundation CSS Materialize CSS Bulma Pure CSS Primer CSS Blaze UI Semantic UI JavaScript Frameworks AngularJS NodeJS JavaScript Libraries jQuery ReactJS Software Designs Software Design Patterns System Design Tutorial GFG Sheets Web Dev Cheat Sheets HTML Cheat Sheet CSS Cheat Sheet JS Cheat Sheet jQuery Cheat Sheet Company-Wise SDE Sheets Facebook SDE Sheet Amazon SDE Sheet Apple SDE Sheet Netflix SDE Sheet Google SDE Sheet Wipro Coding Sheet Infosys Coding Sheet TCS Coding Sheet Cognizant Coding Sheet HCL Coding Sheet DSA Sheets SDE Sheet FAANG Coding Sheet Love Babbar Sheet Mass Recruiter Sheet Product-Based Coding Sheet Company-Wise Preparation Sheet Array Sheet String Sheet Tree Sheet Graph Sheet DP Sheet School Learning School Programming Mathematics Number System Algebra Trigonometry Statistics Probability Geometry Mensuration Calculus Maths Notes (Class 8-12) Class 8 Notes Class 9 Notes Class 10 Notes Class 11 Notes Class 12 Notes NCERT Solutions Class 8 Maths Solution Class 9 Maths Solution Class 10 Maths Solution Class 11 Maths Solution Class 12 Maths Solution RD Sharma Solutions Class 8 Maths Solution Class 9 Maths Solution Class 10 Maths Solution Class 11 Maths Solution Class 12 Maths Solution Physics Notes (Class 8-11) Class 8 Notes Class 9 Notes Class 10 Notes Class 11 Notes Chemistry Notes Class 8 Notes Class 9 Notes Class 10 Notes CS Exams/PSUs ISRO ISRO CS Original Papers and Official Keys ISRO CS Solved Papers ISRO CS Syllabus for Scientist/Engineer Exam UGC NET UGC NET CS Notes Paper II UGC NET CS Notes Paper III UGC NET CS Solved Papers Student Campus Ambassador Program School Ambassador Program Project Geek of the Month Campus Geek of the Month Placement Course Competititve Programming Testimonials Student Chapter Geek on the Top Internship Careers Jobs Apply for Jobs Post a Job Hire with Us Know about Jobathon Jobathon Practice All DSA Problems Problem of the Day Interview Series: Weekly Contests Bi-Wizard Coding: School Contests Events Practice SDE Sheet Curated DSA Lists Top 50 Array Problems Top 50 String Problems Top 50 Tree Problems Top 50 Graph Problems Top 50 DP Problems Contests Write Come write articles for us and get featured Practice Learn and code with the best industry experts Premium Get access to ad-free content, doubt assistance and more! Jobs Come and find your dream job with us Geeks Digest Quizzes Geeks Campus Gblog Articles IDE Campus Mantri Home Courses GBlog Puzzles What's New ? Change Language Data Structures Algorithms Interview Preparation Topic-wise Practice C++ Java Python Competitive Programming Machine Learning JavaScript SDE Sheet Puzzles GFG School Projects Related Articles ▲ Related Articles Output of C programs | Set 49 (Operators) Output of C programs | Set 50 (Control Structures) Output of C programs | Set 51 Output of C programs | Set 52 Output of C programs | Set 53 (Operators) Output of C programs | Set 54 Output of C programs | Set 55 (Ternary Operators) Output of C programs | Set 55 (Shift Operators) Output of C programs | Set 56 (While loop) Output of C programs | Set 57 (for loop) Output of C programs | Set 58 (operators) Output of C programs | Set 59 (Loops and Control Statements) Output of C programs | Set 60 (Constants) Output of C programs | Set 42 Output of C programs | Set 43 Output of C programs | Set 44 (Structure & Union) Output of C programs | Set 45 Output of C programs | Set 46 Output of C programs | Set 47 (Decision and Control Statements) Output of C programs | Set 48 Output of C Programs | Set 9 Arrow operator -> in C/C++ with Examples Output of C Programs | Set 1 Output of Java Program | Set 1 delete keyword in C++ C++ Programming Multiple Choice Questions Output of C++ programs | Set 50 Output of C Programs | Set 2 Output of Python Program | Set 1 Output of Java Program | Set 2 Output of C programs | Set 49 (Operators) Output of C programs | Set 50 (Control Structures) Output of C programs | Set 51 Output of C programs | Set 52 Output of C programs | Set 53 (Operators) Output of C programs | Set 54 Output of C programs | Set 55 (Ternary Operators) Output of C programs | Set 55 (Shift Operators) Output of C programs | Set 56 (While loop) Output of C programs | Set 57 (for loop) Output of C programs | Set 58 (operators) Output of C programs | Set 59 (Loops and Control Statements) Output of C programs | Set 60 (Constants) Output of C programs | Set 42 Output of C programs | Set 43 Output of C programs | Set 44 (Structure & Union) Output of C programs | Set 45 Output of C programs | Set 46 Output of C programs | Set 47 (Decision and Control Statements) Output of C programs | Set 48 Output of C Programs | Set 9 Arrow operator -> in C/C++ with Examples Output of C Programs | Set 1 Output of Java Program | Set 1 delete keyword in C++ C++ Programming Multiple Choice Questions Output of C++ programs | Set 50 Output of C Programs | Set 2 Output of Python Program | Set 1 Output of Java Program | Set 2 Output of C programs | Set 55 (Ternary Operators) View Discussion Improve Article Save Article Like Article Difficulty Level : Medium Last Updated : 19 Sep, 2017 Read Discuss View Discussion Improve Article Save Article Like Article Predict the output of below programs Question 1 #include <stdio.h> int main() { int x, a = 0; x = sizeof(a++) ? printf("Geeks for Geeks\n") : 0; printf("Value of x:%d\n", x); printf("Value of a:%d", a); return 0; } Output: