1. Question:What is the difference between calloc() and malloc() ? 

    Answer
    calloc(...) allocates a block of memory for an array of elements of a certain size. By default the block is initialized to 0. The total number of memory allocated will be (number_of_elements * size).
    
    malloc(...) takes in only a single argument which is the memory required in bytes. malloc(...) allocated bytes of memory and not blocks of memory like calloc(...).
    
    malloc(...) allocates memory blocks and returns a void pointer to the allocated space, or NULL if there is insufficient memory available.
    
    calloc(...) allocates an array in memory with elements initialized to 0 and returns a pointer to the allocated space. calloc(...) calls malloc(...) in order to use the C++ _set_new_mode function to set the new handler mode.






    1. Report
  2. Question:What are library Functions? 

    Answer
    Library Functions are predefined functions and stored in .lib files.






    1. Report
  3. Question:What is an argument? Differentiate between formal arguments and actual arguments? 

    Answer
    An argument is an entity used to pass the data from calling function to
    the called function. Formal arguments are the arguments available in
    the function definition. They are preceded by their own data types.
    Actual arguments are available in the function call.






    1. Report
  4. Question:What is prototype of printf function? 

    Answer
    Prototype of printf function is:
     int printf( const char *format ,…)






    1. Report
  5. Question:What is function recursion? 

    Answer
    When a function of body calls the same function then it is called as 'recursive function.'
    Example:
    Recursion()
    {
        printf("Recursion !");
        Recursion();
    }






    1. Report
Copyright © 2025. Powered by Intellect Software Ltd