1. Question:What is x+ mode in fopen() used for? 

    Answer
    Read/Write. Creates a new file. Returns FALSE and an error if file already exists

    1. Report
  2. Question:How many ways you can read a file?
         

    Answer
    We can read a file by using the following file modes :
               R, r+, w+, a+.

    1. Report
  3. Question:How many ways you can read a file?

     

    Answer
    We can read a file using the following methods and  modes:

    Methods: file(), file_get_contents(), fgetcsv(), fgets(), fgetss(), fgetc(), fread(), readfile(), fscanf().

    Modes: R, r+, w+, a+, x+.

    1. Report
  4. Question:How many ways you can write into a file?

     

    Answer
    We can write a file using the following method and modes:

    Method: fwrite() with fopen() and write mode, file_put_contents(),fputcsv(),fputs(),fputc().

    Modes: r+, W, w+,A,a+,X,x+.


    1. Report
  5. Question:What are the technical difference between echo() and print() function? 

    Answer
    The echo() function is a bit faster because it returns nothing, whereas print() will return 1 if the statement is successfully output.

    1. Report
  6. Question:What is datatype? 

    Answer
    A datatype is the generic name assigned to any data sharing a common set of characteristices.  Common data types include Boolean, integer, float, string, and array.

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