This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Differentiate Get and Post Method? |
|
Answer» Get Method: 1. It is used to send data through URL address. 2. All the input data are visible. 3. It is faster. 4. It is less secure. Post Method: 1. It is send through clients HTTP request. 2. It is not visible. 3. It is little slow. 4. It is secured |
|
| 2. |
Write short notes on File handling? |
|
Answer» 1. File handling is an important activity of all web application development process. 2. Files are processed for different tasks using the following events: 1. Opening a file 2. Reading a file 3. closing a file 4. To write a file 5. To append a file 6. To upload a file |
|
| 3. |
Write the purpose Get method and Post method? |
|
Answer» All input values are synchronized and sent to the server via POST method or GET method. Method is an attribute form tag in HTML. Once the data reaches the server, two PHP variables such as $_POST and $_GET collects the data and prepares the response accordingly. Post Method: The input data sent to the server with POST method is stored in the request body of the client’s HTTP request. Get Method: The input data sent to the server with POST method via URL address is known as query string. All input data are visible by user after they clicks the submit button. |
|
| 4. |
Pick the odd one out(a) PHP (b) JS (c) JSP(d) ASP |
|
Answer» Answer is Js |
|
| 5. |
Write the features Form Handling? |
|
Answer» Form Handling: 1. Form controls are used to collect data from the users and sent to server. 2. When the user keying the input data in HTML controls and clicks the submit button the request will be generated and reaches a PHP file which is mentioned in the FORM tag under the Action attribute. 3. All input values are synchronized and sent to the server via POST method or GET method. 4. Once the data reaches the server, two PHP variables such as $_POST and $_GET collects – the data and prepares the response accordingly. |
|
| 6. |
Compare Text box and Text Area? |
|
Answer» Text Box: 1. Text Box is a single line box 2. Text boxes are generally used for collecting information such as names, email addresses. Text Area: 1. Text area is a multiple line box 2. Text area’s are generally used to gather feedback or comments. 3. It has a limit of 32700 characters. |
|
| 7. |
Write Syntax of Browse button in HTML? |
|
Answer» Syntax: <input type = file name = browse> |
|
| 8. |
If you would like to read a file character by character which function do you use?(a) fopen( ) (b) fread( ) (c) fgetc( ) (d) fleo |
|
Answer» (c) fgetc( ) |
|
| 9. |
Define HTML form controls? |
|
Answer» Main objective of PHP and HTML form controls are to collect data from users. The various form controls are 1. Text inputs 2. Checkbox 3. File Select
|
|
| 10. |
PHP is a …….. typed language.(a) User(b) Loosely(c) Server (d) System |
|
Answer» PHP is a Server typed language. |
|
| 11. |
HTML classes that is already defined and allow us to apply styles on it are called as ……… (a) Pseudo classes (b) Css classes (c) Javascript classes (d) Nre |
|
Answer» (b) Css classes |
|
| 12. |
Write short notes on File handling functions? |
|
Answer» 1. fopen( ) – PHP Open a File 2. fread( ) – PHP Read a File, 3. fclose( ) – PHP Close a File, 4. fwrite( ) – PHP Write a File, 5. file_put_contents( ) – PHP Appending a File |
|
| 13. |
…………. is used to select one value can be chosen at a time.(a) Checkbox(b) Radio box(c) Textbox(d) File |
|
Answer» (b) Radio box |
|
| 14. |
Which one of the control selects more than one value from the HTML form?(a) Checkbox (b) Reset (c) Buttons (d) Text |
|
Answer» (a) Checkbox |
|
| 15. |
Pick the odd one out. (a) Submit (b) Reset (c) File (d) Cancel |
|
Answer» Answer (c) File |
|
| 16. |
……… inputs contain text box and text area controls. |
|
Answer» Text inputs contain text box and text area controls. |
|
| 17. |
Explain concepts of HTTP Uploading process? |
|
Answer» File Upload: 1. File upload is the best feature to select one file from the local machine to server.machine. Form tag is used to mention a method as POST or GET and encrypt attribute mentioned as “multipart/form-data”. 2. In the tag mention type= ”file” attribute shows the input field as a file-select control, with a “Browse” button next to the input control. 3. The form above sends data to a file called “Student_photo_upload.php”. 4. First, ensure that PHP is configured to allow file uploads. 5. In Server machine “php.ini” file, search for the file_uploads directive, and set it to On: “file_upIoads = On” 6. After submitting the upload button the request reaches to Student_photo_upload.php file. In the file $_FILES variable collects all uploaded file information such as name of the file, size of the file and extension of the file etc. 7. All the details are checked thoroughly and the errors are saved in an array variable. 8. The file finally moves under the image directory if the array error variable is empty. |
|
| 18. |
Define Browse button in HTML? |
|
Answer» Browse Button in HTML: 1. In the tag mention type = “file” attribute shows the input field as a file-select control, with a “Browse” button next to the input control. 2. Browse button is used to search for any file or websites. |
|
| 19. |
In get method, the input data sent URL address is known as ............ |
|
Answer» query string |
|
| 20. |
…………. is an attribute of form tag in HTML. (a) post (b) Get (c) method (d) php get |
|
Answer» Method is an attribute of form tag in HTML. |
|
| 21. |
Which tag is used to mention POST or GET method?(a) Frame(b) Form(c) File(d) Input |
|
Answer» Form is used to mention POST or GET method |
|
| 22. |
Which is the best feature to select one file from the local machine to server machine at a time? (a) Radio box (b) Check box (c) File select (d) Textbox |
|
Answer» (c) File select |
|
| 23. |
Write Syntax of Text box in HTML? |
|
Answer» Name: <input type = "text” name= “name"><br> |
|
| 24. |
Define for Form Handling method in PHP? |
|
Answer» 1. Form tag is used to mention a method (POST or GET) and control the entire form controls in the HTML document. 2. All input values are synchronized and sent to the server via POST or GET method. |
|
| 25. |
………. is a process of checking the input data submitted by the user from client machine.(a) collection(b) verification (c) validation (d) Report |
|
Answer» Validation is a process of checking the input data submitted by the user from client machine. |
|
| 26. |
Find the Incorrect pair.(a) Radio box – one value a time(b) File select – Select one file from local machine to server(c) Text – Text Box(d) Input – Text Area |
|
Answer» (d) Input – Text Area |
|
| 27. |
Find the statement which is true.(a) The input data validations are performed on the clients machine’s web browser(b) The input data validations are performed on the server machine |
|
Answer» (a) The input data validations are performed on the clients machine’s web browser |
|
| 28. |
Which one of the following should not be used while sending passwords or other sensitive information?(a) GET (b) POST (c) REQUEST (d) NEXT |
|
Answer» GET not be used while sending passwords or other sensitive information |
|
| 29. |
In HTML form is used for ............(a) One line text (b) Block of text (c) One paragraph (d) None |
|
Answer» (a) One line text |
|
| 30. |
Which directive determines whether PHP scripts on the server can accept file uploads?(a) file_uploads (b) fileupload (c) filejnput (d) file_intake |
|
Answer» (a) file_uploads |
|
| 31. |
When you use the $_GET variable to collect data, the data is visible to ...(a) none (b) only you (c) everyone (d) selected few |
|
Answer» (c) everyone |
|
| 32. |
Usage of File open function? |
|
Answer» 1. fopen( ) is a system function available in PHP. 2. This function helps to open a file in the server. 3. It contains two parameters one for the file and the other one specifies in which mode the file should be opened (Read/Write). |
|
| 33. |
The data to be written to the file cannot be .........(a) string (b) pointers (c) array (d) data stream |
|
Answer» (b) pointers |
|
| 34. |
How many parameters are required and options in the file_put_contents()?(a) 1,2 (b) 2,2 (c) 3,2 (d) 2,1 |
|
Answer» 2,2 parameters |
|
| 35. |
How many parameters are there in file_put_contents( ) function?(a) 2(b) 3 (c) 4(d) 5 |
|
Answer» There are 4 in file_put_contents( ) function |
|
| 36. |
Which one of the following is not an back-end application?(a) CGI(b) HTML(c) ASP Script(d) PHP Script |
|
Answer» HTML is not an back-end application |
|
| 37. |
The “required” attributed in HTML input tags are present in ……. validation.(a) server side(b) client side(c) PHP script(d) script code |
|
Answer» (b) client side |
|
| 38. |
Which function is used to append to a file?(a) fread( ) (b) fopen( ) (c) file_put_contents( ) (d) fwrite( ) |
|
Answer» (c) file_put_contents( ) |
|
| 39. |
The …… function reads from an open file. |
|
Answer» The fread( ) function reads from an open file. |
|
| 40. |
How many parameters are there in fopen( ) functions?(a) 1 (b) 2 (c) 3 (d) 4 |
|
Answer» There are 2 in fopen( ) functions |
|
| 41. |
How PHP files can be accessed?(a) Through Web Browser(b) Through HTML files(c) Through Web Server(d) All of Above |
|
Answer» (d) All of Above |
|
| 42. |
Why does the writer refer to the Queen of Sheba and King Soloman? What do you understand by it? Explain. लेखक शीबा की रानी तथा राजा सोलोमन का संदर्भ क्यों देता है? आप इससे क्या समझते हो? समझाइये। |
|
Answer» Queen of Sheba was the famous queen who visited King Solomon, the king of Israel. King Solomon was regarded as the wisest one. In the story, both of them are supposed to be envious of the possessions of the James Dillingham Youngs in which they both took a mighty pride. One was Jim’s gold watch and the other was Della’s beautiful hair. If the Queen of Sheba had lived in the flat across the airshaft, Della would have let her hair hang out of the window some day to dry just to depreciate. Her Majesty’s jewels and gifts. In the same way, if King Solomon had been the janitor, with all his treasure piled up in the basement, Jim would have pulled out his watch every time he passed just to see him pluck at his beard from envy. शीबा की रानी वह प्रसिद्ध रानी थी जिसने राजा सोलोमन, इजराइल के राजा से भेंट की थी। राजा सोलोमन को सबसे ज्यादा बुद्धिमान माना जाता था। इस कहानी में दोनों को ही जेम्स डिलिंघम यंग्स की उन सम्पत्तियों से ईर्ष्या करते हुए बताया गया है जिन पर वे बहुत गर्व करते थे। एक तो थी जिम की सोने की घड़ी तथा दूसरी डेला के सुंदर बाल। यदि रानी वायुकूपक के पार वाले फ्लैट में रह रही होती तो रानी के रत्नों तथा उपहारों को तुच्छ दिखाने के लिए डेला किसी दिन अपने बालों को सुखाने के लिए खिड़की पर आती। इसी प्रकार से यदि राजा सोलोमन अपनी सम्पूर्ण सम्पत्ति को तहखाने में एकत्र कंर उसका द्वारपाल होता तो जिम जब जब गुजरता अपनी घड़ी निकालता ताकि वह उसे ईष्र्यावश दाढ़ी नोंचते हुए देखे। |
|
| 43. |
Explain resources with examples? |
|
Answer» Resources : Resource is a specific variable, it has a reference to an external resource. These variables hold specific handlers to handle files and database connections in respective PHP program. <?php // Open a file for reading Shandle = fopen(“note.txt” , “r”); var_dump($handle); echo “<br>"; // Connect to MySQL database server with default setting Slink = mysql_connect(“localhost” , “root” , “”); var_dump(Slink); ?> |
|
| 44. |
Discuss in detail about PHP data types? |
|
Answer» PHP Data type: PHP scripting language supports 13 primitive data types. Data Types plays important role in all programing languages to classify the data according to the logics. PHP supports the following data types. 1. String 2. Integer 3. Float 4. Boolean 5. Array 6. Object 7. NULL 8. Resource 1. String: String is a collection of characters within the double or single quotes like “Computer Application” or ‘Computer Application’. Space is also considered as a character. Example: $x = “Computer Application!”; 2. Integer: Integer is a data type which contains non decimal numbers. Example: $x = 59135; * The var_dump( ) system define function, returns structured information (type and value) about variables in PHP. 3. Float: Float is a data type which contains decimal numbers. Example: $x = 19.15; 4. Boolean: Boolean is a data type which denotes the possible two states, TRUE or FALSE Example: $x = true; $y = false; 5. Array: Array is a data type which has multiple values in single variable. Example: Scars = array(“Computer” , “Laptop” , “Mobile”); OUTPUT: array(3) {[0]=> string(5) “Computer” [1]=> string(3) “Laptop “ [2]=> string(6)” Mobile”} Var_dump: The var_dump( ) function is used to dump information about a variable. This function displays structured information such as type and value of the given variable. Arrays and objects are explored recursively with values indented to show structure. 6. Object: PHP object is a data type which contains information about data and function inside-the class. <?php class School { function marks() { $this->sec = “A”; } } // create an object $school obj = new School ( ); ?> OUTPUT NULL 7. NULL: Null is a special data type which contains a single, value: NULL <?php $x = null; ?> OUTPUT: NULL 8. Resources: Resource is a specific variable, it has a reference to an external resource. These variables hold specific handlers to handle files and database connections in respective PHP program. <?php // Open a file for reading Shandle = fopen(“note.txt” , “r”); var_dump($handle); echo “<br>”; // Connect to MySQL database server with default setting Slink = mysql_connect(“localhost” , “root” , “”); var_dump($link); ?> |
|
| 45. |
Tim Benner’s Lee developed (i) Internet (ii) www (iii) Javascript (iv) css(a) only (i) (b) (i) and (ii) (c) (i), (ii), (iii) (d) (ii), (iii), (iv) |
|
Answer» Correct Answer is : (b) (i) and (ii) |
|
| 46. |
Which datatype contains non-decimal numbers? (a) Integer (b) Float (c) Boolean (d) Octal |
|
Answer» Correct Answer is : (a) Integer |
|
| 47. |
……………… is a data type which contains information about data and function inside the class. |
|
Answer» object is a data type which contains information about data and function inside the class. |
|
| 48. |
Which function gives information about the given variable? (a) var( ) (b) variable( ) (c) var-dump( ) (d) vardump( ) |
|
Answer» (c) var-dump( ) |
|
| 49. |
URL Stands for ………… |
|
Answer» URL Stands for Uniform Resource Locator |
|
| 50. |
Define Web browser? |
|
Answer» (i) Web Browser: A Web browser (commonly referred to as a browser) is a software application for accessing information on the World Wide Web. (ii) Each individual Web page, image, and video is identified by a distinct URL, enabling browsers to retrieve and display them on the user’s device. |
|