NTA UGC NET Paper -2
Computer Science & Application
About Me Sandeep M.Tech (IT) from IIIT CSIR (Engineering Science) as JRF UGC NET (JRF) - Computer Science & Applications Worked as Software Engineer & Research Scientist
Part - 02
unacademy Follow me on the Unacademy Learning App 127.1k Sandeep Singh Educator since May 201 Co-founder of BSI Academy. 5 years of teaching Qualified in UGC NET in Computer Science and its Get updates about new courses Watch all my lessons Application as JRF& lecturer 14.7k 0 34 Follow . Download slides and watch offline All courses Q Sandeep Singh HINDI Programming in C&C (Hindi) Concepts of Objects Oriented Programming: CBSE UGC NET 0(6 ratings Sandeep Singh
Assignment statement Assign an expression to a variable var = expr ; . Example =x;
Operators in C Arithmetic Operators : + ,-, * , /, % Relational Operators : >, >=, <.< Logical Operators:!, &&, Il Compound Assignment Operator : =' +-,--, , *=, %= Address Operator: & Pre and Post Operator: ++, , . .
Operator Precedence & Associativity Precedence will be in order of Arithmetic - highest precedence Relational-lower than arithmetic Logical - lower that relational
Example /* this program takes the marks as input, calculates average and prints the same */ #include <stdio.h> //including the std input output library void main(void) I/main is defined which does not take any parameters and returns no value. //henceindicated as void float fMark1, fMark2, fMark3,fSum, fAvg; //variable names need to follow naming conventions scant("XFXF%f",&fMark1,&Mark2,&Mark3); //use & while accepting fAvgzfSum/ 3; printf("%f", fAvg) ;
Conditional Statement if (expr) Stmnt1; Stmnt2;Stmnt3; printf ("iNi is larger"); else printf(" N2 is larger");
Looping Statements sumsum + l;
Co-founder of BSI Academy. 5 years of teaching experience. Qualified in UGC NET & CSIR in Computer Science as JRF & lecturer.