1. Question:Define exceptions?

     

    Answer
    Programming, like the real world, often involves unforeseen happenings that disrupt the flow of events. In programmer’s lingo, these unexpected happenings are known as exceptions.

    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:What are the types of key of array? 

    Answer

    There are two types of key of array. It can be numerical And associative.

    Numerical :It stores each array element with numeric index name.

    associative : It contains characteristic element or string index name.


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

     

    Answer
    Regular expressions provide the foundation for describing or matching data according to defined syntax rules. A regular expression is nothing more than a pattern of characters itself, matched against a certain parcel of text.


    1. Report
  5. 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
  6. Question:

    What are class and object?

     

    Answer

    Class:Classes are intended to represent those real-life items that coder like to manipulate within an application.

    object: An instance of class is called object.


    1. Report
  7. Question:What is the meaning of a final class and a final method? 

    Answer
    Final keywords indicates that the class or method cannot be extended.

    1. Report
  8. 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
  9. Question:What is property overloading? 

    Answer
    Property overloading continues to protect properties by forcing access and manipulation through public methods, yet allowing the data to be accessed as if it were a public property.

    1. Report
  10. Question:What is the functionality of the function strstr and stristr?

     

    Answer
    Strstr(): The strstr() function returns the remainder of a string beginning with the first occurrence of a predefined string.

    Stristr():The strstr() function returns the remainder of a string beginning with the first occurrence of a predefined string ignoring case-sensitivity.


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