Author: admin

  • Variable Length Arrays in C

     variable length array in C is also called a variable-sized or runtime-sized array. It is an array whose length is determined at the runtime rather than at the time of compiling the program. Its size depends on a value generated during the runtime of a program, usually received as an input from the user. Usually,…

  • Data Types

    Data Division is used to define the variables used in a program. To describe data in COBOL, one must understand the following terms − Data Name Data names must be defined in the Data Division before using them in the Procedure Division. They must have a user-defined name; reserved words cannot be used. Data names…

  • Return an Array from a Function in C

    Functions in C help programmers to apply modular program design. A function can be defined to accept one or more than one arguments but it can return a single value to the calling environment. However, the function can be defined to return an array of values. In C, a function can be made to return…

  • Passing Arrays as Function Arguments in C

    If you want to pass an array to a function, you can use either call by value or call by reference method. In “call by value” method, the argument to the function should be an initialized array. Here, an array of fixed size equal to the size of the array to be passed. In “call by reference” method, the…

  • Multi-dimensional Arrays in C

    The array is declared with one value of size in square brackets, it is called one dimensional array. In a one dimensional array, each element is identified by its index or subscript. In C, you can declare with more indices to simulate a two, three or multidimensional array. Multidimensional Arrays in C Multi-dimensional arrays can…

  • C – Properties of Array

    Arrays are a very important data structure in C. Use of array in C program makes it easier to handle large amount of data. Arrays have a number of advantages over singular variables as a result of their number of properties. Most of the important properties of array are a result of its composition −…

  • 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…