Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
PROGRAMMING
(with C++)
1. ADA
2. C++
3. Java
4. C# (C sharp)
Most of them also supports full syntax of
procedure oriented programming .
Each of them supports object oriented
features to varied degree.
single line //
e.g/* this is
documentation*/
3. Spaces and tabs can be inserted anywhere to
increase readability
e.g a=12*b-(c/2) is same as 12 * b –( c / 2)
1. Standard C library.
2. Class library(that supports object
oriented programming)
Identifiers
Constant
Operators
Double,new,else,if,break,continue,long,
int,float,for ,while,class,inline,struct,void etc.
Operator Action
&& AND
|| OR
! NOT
Addition(+)
Subtraction(-)
Multiplication(*)
Division(/)
Modulus(%)
Unary minus(-)
Unary Plus(+)
Built-in User-defined
Structure
Integer
Derived
Union
Character Array
Float Class
Pointer
Enumeration
Void Reference
int main()
{…..
int sum=32 ,number=4;
………
float average=sum/number;
}
while
For Iteration/Loop
Break
Continue
go to Jump
Return
}
OOPS (Unit - 1) Dr. Gaurav Gupta 43
Questions
ANS C
OOPS (Unit - 1) Dr. Gaurav Gupta 44
2. Which is true about C and C++?
a. C is a superset of C++
b. C is a subset of C++
c. Both have different spaces
d. Both are same
e. None.
ANS B
ANS 1, 3 and 4
OOPS (Unit - 1) Dr. Gaurav Gupta 47
5. Which syntax is not correct in C++?
a. For(a=1,b=3;a*b<100;a++);
b. Switch (char array)
{case “abc”: ……;break;}
c. for(;;){ statements…..}
d. For(;a<10;a++);
e. For (int a=1;a<13;);
f. All of the above
ANS b
name is default
no is23