1. Question:Define exceptions?

     

    Answer
    An exception is an abnormal condition that arises in a code sequence at run time. Basically there are four important keywords which form the main pillars of exception handling: try, catch, throw and finally. 







    1. Report
  2. Question:What is regular expression?

     

    Answer
    Regular expressions provide the foundation for describing or matching data according to defined  syntax rules. Generelly regular expressions declared by "/^[value]{range}$/";.







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

     

    Answer
    We can read a file using the following mode and Methods:-
    Methods- file(), file_get_contents(), fgetcsv(), fgets(), fgetss(), fgetc(),fresd(), readfile(), fscanf(). 
    Mode-  R, r+, w+, a+, x+







    1. Report
  4. Question:Why substr() is used? 

    Answer
    Ans:  The substr() function is used to return the part of a string located between a predefined starting offset and length position.
    Its prototype follows:
    string substr(string str, int start [, int length])






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

     

    Answer
    We can write into a file using the following mode and Methods:
    Methods- fwrite() with fopen, file_put_contants().  
    Mode-  r+,  W,  w+, A, a+, X, x+







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