Author: admin

  • Pointers and Arrays in C

    In C programming, the concepts of arrays and pointers have a very important role. There is also a close association between the two. In this chapter, we will explain in detail the relationship between arrays and pointers in C programming. Arrays in C An array in C is a homogenous collection of elements of a…

  • Conditional Statements

    Conditional statements are used to change the execution flow depending on certain conditions specified by the programmer. Conditional statements will always evaluate to true or false. Conditions are used in IF, Evaluate, and Perform statements. The different types of conditions are as follows − IF Condition Statement IF statement checks for conditions. If a condition…

  • Pointers in C

    Pointers in C are easy and fun to learn. Some complex C programming tasks can be performed more easily with pointers, while some other tasks such as dynamic memory allocation cannot be performed without using pointers. So it becomes necessary to learn pointers to become a perfect C programmer. With pointers, you can access and…

  • Data Layout

    COBOL layout is the description of use of each field and the values present in it. Following are the data description entries used in COBOL − Redefines Clause Redefines clause is used to define a storage with different data description. If one or more data items are not used simultaneously, then the same storage can…

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