Breaking

शुक्रवार, 3 अप्रैल 2020

BCA 2nd Sem Notes- Structure definition in c

  • UNIT-I (Array)
~Definition
~Declaration & initialization of 1D 
~Accessing array elements
~Displaying array elements
~Sorting arrays
~Arrays and function
~Declaration & initialization of 1D
~Accessing and Displaying
~Memory representation of array [Row Major, Column Major]
~Multidimensional array

  • UNIT-II (Pointers)
  • ~Definition`Declaration & ~initialization~Indirection operator
    ~address of operator
    ~pointer arithmetic
    ~dynamic memory allocation
    ~arrays and pointers
    ~function and pointers

  • UNIT-III (Strings)
  • ~Definition
    ~Declaration & initialization
    ~standard libraryfunction strlen()
    strlen(),strcpy(),strcat(),strcmp()

  • UNIT-V (C Preprocessor)

  • ~Definition
    ~Macro substitution directives
    ~File inclusion directives
    ~Conditional compilation
    ~Bitwise Operators
    ~Shift operators
    ~Masks
    ~Bitfield

  • UNIT-VI (File handling)

  • ~Definition of Files,
    ~Opening modes of files
    ~Standard function
    fopen(), fclose(), feof()
    fseek(), fewind()
    ~Using text files
    fgetc(), fputc(), fscanf()

     C Structure

    A structure is an arrangement and organization of interrelated elements in a material object or system, or the object or system so organized

    The structure is a user-defined data type in C language which allows us to combine data of different types together. structure assists with developing a perplexing information type which is increasingly significant. It is to some degree like an Array, however, a cluster holds information of comparable kind as it were. Be that as it may, the structure then again can store information of any sort, which is down to earth progressively valuable.

    How to characterize structures? 

    Before you can make structure factors, you have to characterize its information type. To characterize a struct, the struct watchword is utilized.

    Syntax of struct


    struct structureName
    {
        dataType member1;
        datatype  member2;
         ...
    };

    Example


    struct Person
    {
        char name[50];
        int  no;
        float Salary;
    };

    Here, a derived type  Struct Person is defined. Now, you can create variables of this type

     Previous Page                       
    Next Page  

    कोई टिप्पणी नहीं:

    एक टिप्पणी भेजें