Author: admin

  • Arrays in C

    Arrays in C are a kind of data structure that can store a fixed-size sequential collection of elements of the same data type. Arrays are used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type. What is an Array…

  • Global Variables in C

    Global variables are defined outside a function, usually at the top of a program. Global variables hold their values throughout the lifetime of a program and they can be accessed inside any of the functions defined for the program. If a function accesses and modifies the value of a global variable, then the updated value is…

  • Basic Syntax

    Character Set ‘Characters’ are lowest in the hierarchy and they cannot be divided further. The COBOL Character Set includes 78 characters which are shown below − Sr.No. Character & Description 1 A-ZAlphabets(Upper Case) 2 a-zAlphabets (Lower Case) 3 0-9Numeric 4  Space 5 +Plus Sign 6 –Minus Sign or Hyphen 7 *Asterisk 8 /Forward Slash 9…

  • Static Variables in C

    By default, a C variable is classified as an auto storage type. A static variable is useful when you want to preserve a certain value between calls to different functions. Static variables are also used to store data that should be shared between multiple functions. Static Variables The static variables belong to the static storage class, they are initialized only…

  • Scope Rules

    A scope in any programming is a region of the program where a defined variable can have its existence and beyond that variable it cannot be accessed. There are three places where variables can be declared in C programming language − Let us understand what are local and global variables, and formal parameters. Local Variables Variables that are declared inside a function…

  • Program Structure

    A COBOL program structure consists of divisions as shown in the following image − A brief introduction of these divisions is given below − You can co-relate the above-mentioned terms with the COBOL program in the following example − Divisions A COBOL program consists of four divisions. Identification Division It is the first and only…

  • Recursion in C

    Recursion is the process by which a function calls itself. C language allows writing of such functions which call itself to solve complicated problems by breaking them down into simple and easy problems. These functions are known as recursive functions. What is a Recursive Function in C? A recursive function in C is a function that calls itself. A…

  • Environment Setup

    Installing COBOL on Windows/Linux There are many Free Mainframe Emulators available for Windows which can be used to write and learn simple COBOL programs. One such emulator is Hercules, which can be easily installed on Windows by following a few simple steps as given below − Hercules is an open-source software implementation of the mainframe…

  • Overview

    Introduction to COBOL COBOL is a high-level language. One must understand the way COBOL works. Computers only understand machine code, a binary stream of 0s and 1s. COBOL code must be converted into machine code using a compiler. Run the program source through a compiler. The compiler first checks for any syntax errors and then converts…

  • Return Statement in C

    The return statement terminates the execution of a function and returns control to the calling function. Every function should have a return statement as its last statement. While using the returns statement, the return type and returned value (expression) must be the same. Syntax of return Statement Here is the syntax of the return statement: The following main() function shows return as its…