Conditional Operator in C and C++

Conditional Operator is an operator which is substitutive for if-else statements. It is a ternary operator (operator which operates on 3 operands). It is often called ?: operator. The operands are expression1, expression2 and expression3. The syntax is as follows:

expression1 ? expression2 : expression3

The expression expression1  will be evaluated always. Execution of expression2 and expression3 depends on the outcome of expression1. expression1 is checked whether true or not. It is considered like a boolean variable. The outcome of an expression is true if it has a non zero value. If its value is zero, the outcome of expression is false. If the expression1 is true, then expression2 is evaluated. If the expression1 is false, then expression3 is evaluated. Consider the following example:

Mathematics Capsule for Engineering Entrance Exams in India

In this post, i am adding a mathematics capsule for entrance exams for engineering in India. This capsule is based on Higher secondary syllabus and contains Formulae, shortcut equations, tips and tricks that may be helpful for solving objective questions from mathematics.
I hope this pdf will be helpful for those students who are preparing for competitive entrance exams like KEAM, AIEEE, IIT JEE etc.
Click the following link to download the capsule as pdf.
Download

Ebay Promo Codes or E-coupons

This post contains insta Coupons for online purchasing from ebay.in. They are also called e-coupons, promo codes,.discount coupons etc. I am listing each.

EBAY3WATCH to get Rs. 1000 off on premium watches.

To get 7% off:

JPDXN8PEFI
4BQE54TNRW
RIJQVJHEJF
BAVCVXVZWW
HVFKSSU1HL
QF5NDOHMNK
COHBMJ2HM4

When you proceed to buy any product from Ebay.in you can see a field to enter a code like this. Enter any of above code there to get discounts as mentioned above.

Binary Tree And Prefix & Postfix Notations Of Arithmetic Expressions

We can construct meaningful derivation trees that enable us to represent arithmetic expressions in infix, prefix and postfix forms. A binary tree is enough to represent all these three notations of arithmetic expressions. Both prefix and postfix notations are unintelligable for humans. But they are of great use in computer science. Compilers often convert infix to prefix notation and then to assembler code. From a derivation tree of an algebraic expression, we can get equivalent prefix and postfix notations. An algebraic expression in terms of operators and operands can be derived by an ambiguous context-free grammar. Prefix notation is the parenthesis-free notational scheme invented by Polish logician Jan Lukasiewicz and is often called polish notation. In prefix notation operators are followed by operands.

For example, in prefix notation A + B is written as +AB. Postfix notation is reverse of prefix notation. AB+ is  the equivalent postfix notation of A + B. The infix form is evaluated and the binary tree is created according to the priority of the operators. Let us start from the simplest examples.

Fourier Series Textbook

A textbook for chapter ( Module ) Fourier series. Fourier Series  is included in Mathematics Syllabus for Bachelor Degrees including BTech (Engineering) in most universities. Download pdf BTech maths text for MG University on Fourier series
Download here

Linear Search in C and C++ Languages

Linear search simply means 'looking for an element in the whole array from one end to the other'. The searched element is compared with the first element of array first, then with the second, then with the third, so on upto the end of the array. This is time consuming when the array is pretty enough. The time complexity is highest.The C and C++ programs for linear search is given below.

C Program:

#include<stdio.h>

void main()
{

C and C++ Programs to Check Whether a Number is Strong Number or Not

This post contains C and C++ program to check whether a given number is Strong number or not. A strong number is a number for which the sum of factorials of its digits is equal to the number itself. The first one is C program to check whether the input number is a strong number or not. An example is 145. 1!+4!+5!=1+24+120=145 Therefore 145 is a strong number.

C Program:

#include<stdio.h>
long int factorial(int n)

{

Syllabus for First Year Btech under MG University (combined Ist & IInd Sem) (Common for all branches)

EN010 101 ENGINEERING MATHEMATICS – I

Credits: 5
Teaching Scheme
2 hour lecture and 1 hour tutorial per week

MODULE I (18 hours) - MATRIX
Elementary transformation – echelon form – rank using elementary transformation by reducing in to echelon
form – solution of linear homogeneous and non – homogeneous equations using elementary transformation.
Linear dependence and independence of vectors – eigen values and eigen vectors – properties of eigen values
and eigen vectors(proof not expected) – Linear transformation – Orthogonal transformation –
Diagonalisation – Reduction of quadratic form into sum of squares using orthogonal transformation – Rank,
index, signature of quadratic form – nature of quadratic form

BTech Computer Science and Engineering Third Semester Syllabus for MG University

The syllabus for Third semester BTech Computer Science and Engineering under MG (Mahatma Gandhi) University is given below. You can also download the syllabus.
Click here to download as pdf


EN010301B ENGINEERING MATHEMATICS II (CS, IT)

Credits 4


MODULE 1 Mathematical logic (12 hours)

Basic concept of statement, logical connectives, Tautology and logical equivalence - Laws of algebra of propositions - equivalence formulas- Tautological implications (proof not expected for the above laws, formulas and implications). Theory of inference for statements — Predicate calculus - quantifiers - valid formulas and equivalences -free and bound variables - inference theory of predicate calculus