Breaking

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

BCA 2nd Sem notes- Differentiate between Union and structure 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)

  •   strlen(),strcpy(),       strcat() ,strcmp()



  • UNIT-IV (Structures)
  • Definition



  • UNIT-V                                     (C Pre-processor)




  • UNIT-VI                                (File Handling)


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


    Differentiate between Union and structure
    StructureUnion
    Struct keyword is used to define a structure.Union keyword is used to define a union.
    Members do not share memory in a structure.Members share the memory space in a union.
    Any member can be retrieved at any time in a structure.Only one member can be accessed at a time in a union.
    Several members of a structure can be initialized at once.Only the first member can be initialized.
    The size of the structure is equal to the sum of the size of each member.The size of the union is equal to the size of the largest member.
    Altering the value of one member will not affect the value of another.Change in the value of one member will affect other member values.
    Stores different values for all the members.Stores the same value for all the members.


    Previous Page              
    Next Page  

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

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