Ternary Operator : Sample Program Part 2

Ternary Operator

The video explains the method to use ternary operator in C program. What is important here is, programmer should not forget that conditional expression written using ternary operator returns the value.

Ternary operator is very handy operator to make the code consice in many situation not only in C but C++ and Java as well.

Access this framework with lot more stuff like C language MCQ, viva and interview preparation, Glossary, Solved Programs of C language etc. please register for discount coupon

cenglishcppengcmarathi

Introduction to ternary operators

Ternary Operators – Introduction

C language has got 3 different categories of operators viz. unary, binary and ternary. Here is the video to explain introduction to ternary operator in C language.

The use of ternary operator has to be recognized not only in C but C++ as well ahead.

Access this framework with lot more stuff like C language MCQ, viva and interview preparation, Glossary, Solved Programs of C language etc. please register for Discount Coupon

cenglishcppengcmarathi

Leap Year Program Using Logical Operator Part 2

Leap year Program using logical operators – Part 2

The part 1 shows how we were wrong to put the logic wrongly. Here is the program with correct code

What is important in this code is importance of brackets besides logical AND and logical OR operators.

Access this framework with lot more stuff like C language MCQ, viva and interview preparation, Glossary, Solved Programs of C language etc.

cenglishcppengcmarathi

Leap Year Program using logical operators Part 1

Leap year program using logical operators – Part 1

We have been encountering Leap year since our school days. So how C can abstain from taking same example to teach basic concepts of decision control structures in it…? See the first part of sample program…

It is not the leap year which is just divisible by 4, as used to teach in school days…its more than that…

Access this framework with lot more stuff like C language MCQ, viva and interview preparation, Glossary, Solved Programs of C language etc.

udemy_c_marathi

Logical NOT (!) operator in C

Logical ! (NOT) operator in C

“माझ तुझ्यावर प्रेम नाही असं नाही…!” काय अर्थ आहे हो या वाक्याचाheart

समजायला सोपा पण वापरायला अवघड असा हा logical operator. पण अवघड म्हणजे syntax अवघड नाही तर कोणत्या situation ला नेमका त्याचा वापर करायचा ती ओळखणे अवघड. पहा आम्ही logical NOT operator कसा समजावून सांगीतलाय ते…

Unlike other 2 logical operators i.e. Logical && (AND) and Logical || (OR), this is unary operator. It turns true to false and false to true…!

Access this framework with lot more stuff like C language MCQ, viva and interview preparation, Glossary, Solved Programs of C language etc. please register for Discount Coupon

cenglishcppengcmarathi

Logical OR (||) operator in C

Logical || (OR) operator in C

दोन किंवा दोन पेक्षा जास्त कंडीशंन्स चेक करायच्या असतील आणी त्या पैकी फक्त एक जरी True होत असेल तर पुर्ण condition True असे हवे असेल तर logical || (OR) operator वापरण्याची सोय डेनीसनं करून ठेवली आहे.

Here if two or multiple conditions are tested using logical OR operator then the whole condition is false only when all conditions are false. In rest of the cases the final condition will be true…

Access this framework with lot more stuff like C language MCQ, viva and interview preparation, Glossary, Solved Programs of C language etc.

cenglishcppengcmarathi

Logical AND (&&) operator

Logical && (AND) operator in C

एका पेक्षा अनेक कंडीशंन्स टेस्ट करायच्या असतील तर आपण नेस्टींग वापरतो. पण नेस्टींग सुद्धा काहीवेळा complex होत जाते. यावरच एक उत्तम उपाय म्हणजे logical operators चा योग्य ठिकाणी वापर. 

When two are more than 2 conditions are to be tested then logical AND operator gives you truth value when all conditions are true. In rest of the cases it would return 0 i.e. FALSE

Access this framework with lot more stuff like C language MCQ, viva and interview preparation, Glossary, Solved Programs of C language etc.

cenglishcppengcmarathi

Nested if else Part 02

sample program with flow chart on nested if else

Flow Chart is a graphical representation to depict flow of the control. It helps programmer to put the programming logic on the paper so that mistakes and bugs while writing source code can be minimised. The sample program reiterates the same while explaining real life program in C language.

Carefully observe how nesting of if else has been done to find grade obtained by student.

Access this framework with lot more stuff like C language MCQ, viva and interview preparation, Glossary, Solved Programs of C language etc. please register for Discount Coupon

cenglishcppengcmarathi

Nested if else 01

Introduction to nesting of if else control structure

एका पेक्षा जास्त conditions check करायच्या असतील तर एका if किंवा if else कंट्रोल स्ट्रक्चर च्या बॉडीमध्ये दुसरे if किंवा if else control structure लिहावे लागते. अशा प्रकारच्या पद्धतीला nesting असे म्हणतात. नेस्टींग हे अन्य कंट्रोल स्ट्रक्चर मध्ये सुद्धा असते. या ठिकाणी नेस्टिंग म्हणजे काय, कोणत्या ठिकाणी वापरायचे, कसे वापरायचे हे सर्व सांगीतले आहे.

There are many ways to write if or if else blocks inside if or else blocks. So infinite combinations will take place as per need and situation of the problem. Ultimately it is the logic put by programmer to design the code.

Access this framework with lot more stuff like C language MCQ, viva and interview preparation, Glossary, Solved Programs of C language etc.

cenglishcppengcmarathi