Author: admin

  • C++ Functions

    A function is a group of statements that together perform a task. Every C++ program has at least one function, which is main(), and all the most trivial programs can define additional functions. You can divide up your code into separate functions. How you divide up your code among different functions is up to you, but…

  • File Handling

    The concept of files in COBOL is different from that in C/C++. While learning the basics of ‘File’ in COBOL, the concepts of both languages should not be corelated. Simple text files cannot be used in COBOL, instead PS (Physical Sequential) and VSAM files are used. PS files will be discussed in this module. To understand file handling in…

  • Table Processing

    Arrays in COBOL are known as tables. An array is a linear data structure and is a collection of individual data items of same type. Data items of a table are internally sorted. Table Declaration Table is declared in Data Division. Occurs clause is used to define a table. Occurs clause indicates the repetition of data name…

  • C++ decision making statements

    Decision making structures require that the programmer specify one or more conditions to be evaluated or tested by the program, along with a statement or statements to be executed if the condition is determined to be true, and optionally, other statements to be executed if the condition is determined to be false. Following is the…

  • C++ Loop Types

    There may be a situation, when you need to execute a block of code several number of times. In general, statements are executed sequentially: The first statement in a function is executed first, followed by the second, and so on. Programming languages provide various control structures that allow for more complicated execution paths. A loop…

  • Operators in C++

    An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations. C++ is rich in built-in operators and provide the following types of operators − This chapter will examine the arithmetic, relational, logical, bitwise, assignment and other operators one by one. Arithmetic Operators There are following arithmetic operators supported by…

  • Storage Classes in C++

    A storage class defines the scope (visibility) and life-time of variables and/or functions within a C++ Program. These specifiers precede the type that they modify. There are following storage classes, which can be used in a C++ Program The auto Storage Class The auto storage class is the default storage class for all local variables. The example…

  • C++ Modifier Types

    C++ allows the char, int, and double data types to have modifiers preceding them. A modifier is used to alter the meaning of the base type so that it more precisely fits the needs of various situations. The data type modifiers are listed here − The modifiers signed, unsigned, long, and short can be applied to integer base types. In addition, signed and unsigned can be applied…

  • C++ Constants/Literals

    Constants refer to fixed values that the program may not alter and they are called literals. Constants can be of any of the basic data types and can be divided into Integer Numerals, Floating-Point Numerals, Characters, Strings and Boolean Values. Again, constants are treated just like regular variables except that their values cannot be modified after…

  • Variable Scope in C++

    A scope is a region of the program and broadly speaking there are three places, where variables can be declared − We will learn what is a function and it’s parameter in subsequent chapters. Here let us explain what are local and global variables. Local Variables Variables that are declared inside a function or block…