Class 11 Computer Science Ch 3: Introduction to Programming in C++

Syllabus

"Object Oriented Technology is regarded as the ultimate paradigm for the modeling of information, be that information data or logic. The C++ has by now shown to fulfill this goal."

Programming by Example in C++ Language: C++ character set, C++Tokens (Identifiers, Keywords, Constants, Operators), Structure of a C++ Program (include files, main function); Header filesiostream.h. iomanip.h; cout, cin; Use of I/O operators (<< and >>), Use of endl and setw (), Cascading of I/O operators, Error Messages; Use of editor, basic commands of editor, compilation, linking and execution; standard input/output operations from C language; gets(), puts() of stdio.h header file;

Data Types, Variables and Constants: Concept of Data types; Built-in Data types: char, int, float and double; Constants: Integer Constants, Character Constants (Backslash character constants-\n, \t), Floating Point Constants, String Constants; Access modifier const; Variables of built-in data types, Declaration / initialisation of variables. Assignment statement: Type modifier; signed, unsigned, long;

Operators and Experessions: Operators Arithmetic operators (.+. *, /, %), Unary operator (-), Increment and Decrement Operators (-, ++), Relational operators (>, >=, <, <=, ==, !=), Logical operators (!, &&, ||), Conditional operator : <condition>?<if true>:<else>; Precedence of Operators; Expressions; Automatic type conversion in expression, Type casting; C++ shorthand's (+, -, *, /=, %=);

Flow of Control: Conditional statements: if-else, Nested if, switch..case..default, Nested switch..case, break statement (to be used in switch..case only); Loops: while, do while, for and Nested loops;

Header File: ctype.h, stdlib.h, string.h, math.h, stdlib.h;

Structured Data Type: Array Declaration/initialisation of One-dimensional arry, Inputting array elements, Accessing array elements. Manipulation of Array elements (sum of elements, product of elements, average of elements, linear search, finding maximum/minimum value);

String Functions: Declaration/Initialization of a String, string manipulations (counting vowels/consonants/digits/special characters, case conversion, reversing a string, reversing each word of a string);

Character Functions: isalnum (), isalpha(), isdigit(), islower(), isupper(), tolower(), toupper (); strepy(), streat (), strlen(), stremp(), strempi();

Mathematical Functions: fabs(), log(), log10(), pow(), sqrt(), sin(), cos(), abs(), randomize(), random();

Two-dimensional Array: Declaration/initialisation of a two-dimensional array, inputting array elements Accessing array elements, Manipulation of Array elements (sum of row element, column elements, diagonal elements, finding maximum/minimum values);

User Defined Functions: Defining a function; function prototype, Invoking/ calling a function, passing arguments to function specifying argument data types, default argument, constant argument, call by value, call by reference, returning values from a function, calling functions with arrays, scope rules of functions and variables; local and global variables.

Event Programming: Games as examples

General Guidelines: Initial Requirement, developing an interface for user (it is advised to use text based interface screen), developing logic for playing the game and developing logic for scoring points.

1. Memory Game: A number guessing game with application of 2 dimensional arrays containing randomly generated numbers in pairs hidden inside boxes.

2. Cross 'N Knots Game: A regular tic-tac-toe game.

3. Hollywood/Hangman: A word Guessing game.

4. Cows 'N Bulls: A word/number Guessing game.

We use essential cookies to maintain secure sessions and prevent CSRF attacks. With your consent, we and our authorized partner (Google AdSense) also use cookies to serve relevant educational advertisements and evaluate traffic. Learn more in our Cookie Policy and Privacy Policy.