.
  Vyom World.com . Let's Touch the Sky Together!  
.

Home
VyomWorld.com Home
Interview Questions
VyomLinks.com Home
JobsAssist.com Home
Vyom Network
Contact Us
Jobs & Careers
Resume Submitter
Placement Papers
IT Companies Directory
Computer Jobs
Interview Questions
Online Exams
Vyom Career eMag.
Fun
Send FREE SMS!
SMS Jokes
Source Codes Library
Source Codes Home
ASP Source Codes
C Source Codes
C++ Source Codes
COBOL Source Codes
Java Source Codes
Pascal Source Codes
Submit Source Codes
GATE
GATE an Overview
GATE Preparation
Study Materal
GRE
GRE an Overview
GRE Questions
GRE Preparation
GRE Universities
TOEFL Preparation
TOEFL Resources
GMAT Preparation
GMAT Resources
MBA Preparation
MBA Resources
Networking Concepts
Networking Concepts
Testing Preparation
Testing Resources
Webmasters
Free Traffic Builder
Webmaster Articles
Web Hosting
Tutorials
Hardware Tutorial
1500 Free eBooks New!


Home » Placement Papers » Ubinetics Placement Papers » Ubinetics Previous Year Placement Paper

 

Ubinetics Placement Paper -: PHP Questions And Answers


Advertisements
Advertisements




Ubinetics Previous Years Solved Sample Placement Papers

  1. What is the use of fopen() function in PHP?

    A. The fopen() function is used to open folders in PHP

    B. The fopen() function is used to open remote server

    C. The fopen() function is used to open files in PHP Answer: Option C

    D. None of the above

  2. Solution: PHP fopen() function is used to open files or URLs and returns a resource. It accepts two arguments: $filename and $mode. The $filename represents the file to be opened, and $mode represents the file mode, e.g., read-only, read-write, write-only, etc.
  3. What is the use of isset() function in PHP?

    A. The isset() function is used to check whether a variable is set or not Answer: Option A

    B. The isset() function is used to check whether the variable is free or not

    C. The isset() function is used to check whether the variable is a string or not

    D. None of the above

  4. Solution: The isset() function is a built-in function in PHP used to determine whether a variable is set. If a variable is considered set, it means the variable is declared and has a different value from NULL. This function returns true if the variable is not null; otherwise, it returns false.
  5. What is the use of sprintf() function in PHP?

    A. The sprintf() function is used to print the output of a program

    B. The sprintf() function is used to send output to a variable Answer: Option B

    C. Both of the above

    D. None of the above

  6. Solution: The sprintf() function is an in-built function in PHP that writes a formatted string to a variable. Unlike printf(), it saves the output into a string instead of displaying it on the browser.
  7. Which of the following is the correct way to open the file "sample.txt" as readable?

    A. fopen("sample.txt", "r"); Answer: Option A

    B. fopen("sample.txt", "r+");

    C. fopen("sample.txt", "read");

    D. fopen("sample.txt");

  8. Solution: The fopen() function accepts two arguments: $filename and $mode. The $filename represents the file to be opened, and $mode represents the file mode. The "r" mode opens the file in read-only mode, placing the file pointer at the beginning of the file.
  9. Which of the following function displays the information about PHP and its configuration?

    A. php_info()

    B. phpinfo() Answer: Option B

    C. info()

    D. None of the above

  10. Solution: The phpinfo() function gives information about the PHP configuration and installation. It is generally used to check configuration settings.
  11. Which of the following function is used to find files in PHP?

    A. glob() Answer: Option A

    B. fold()

    C. file()

    D. None of the above

  12. Which of the following must be installed on your computer so as to run PHP script?

    i) Adobe Dreamweaver

    ii) PHP

    iii) Apache

    iv) IIS

    A. All of the mentioned

    B. Only (ii)

    C. (ii) and (iii)

    D. (ii), (iii) and (iv) Ans: D

  13. We can use ___ to comment a single line?

    i) /?

    ii) //

    iii) #

    iv) /* */

    A. Only (ii)

    B. (i), (iii) and (iv)

    C. (ii), (iii) and (iv) Ans: C

    D. Both (ii) and (iv)

  14. Which of the below symbols is a newline character?

    A. \r

    B. \n Ans: B

    C. /n

    D. /r

  15. Which of the following PHP statement/statements will store 111 in variable num?

    i) int $num = 111;

    ii) int mum = 111;

    iii) $num = 111;

    iv) 111 = $num;

    A. Both (i) and (ii)

    B. All of the mentioned.

    C. Only (iii) Ans: C

    D. Only (i)

  16. What will be the output of the following PHP code?

    
    
        

    A. 3

    B. 1+2 Ans: B

    C. 1.+.2

    D. Error

  17. What will be the output of the following PHP code?

    
    
        

    A. 3 Ans: A

    B. 1+2

    C. Error

    D. 12

  18. Which of the following variables can be assigned a value to it?

    (i) $3hello

    (ii) $_hello

    (iii) $this

    (iv) $This

    A. All of the mentioned

    B. Only (ii)

    C. (ii), (iii) and (iv)

    D. (ii) and (iv) Ans: D

  19. What will be the output of the following code?

    
    
        

    A. Error

    B. My name is BobBob

    C. My name is BobMy name is Bob

    D. My name is Bob Bob Ans: D

  20. Which function returns an array consisting of associative key/value pairs?

    A. count()

    B. array_count()

    C. array_count_values() Answer: Option C

    D. count_values()

  21. The updated MySQL extension released with PHP 5 is typically referred to as:

    A. MySQL

    B. mysql

    C. mysqli Answer: Option C

    D. mysqly

  22. Which one of the following statements is used to create a table?

    A. CREATE TABLE table_name (column_name column_type); Answer: Option A

    B. CREATE table_name (column_type column_name);

    C. CREATE table_name (column_name column_type);

    D. CREATE TABLE table_name (column_type column_name);

  23. Which one of the following statements can be used to select the database?

    A. $mysqli=select_db(‘databasename’);

    B. mysqli=select_db(‘databasename’);

    C. mysqli->select_db(‘databasename’);

    D. $mysqli->select_db(‘databasename’); Answer: Option D

  24. Which of the methods are used to manage result sets using both associative and indexed arrays?

    A. get_array() and get_row()

    B. get_array() and get_column()

    C. fetch_array() and fetch_row() Answer: Option C

    D. fetch_array() and fetch_column()

  25. Which two predefined variables are used to retrieve information from forms?

    A. $GET & $SET

    B. $_GET & $_SET Answer: Option B

    C. $__GET & $__SET

    D. GET & SET

  26. When you use the $_GET variable to collect data, the data is visible to:

    A. None

    B. Only you

    C. Everyone Answer: Option C

    D. Selected few




 


.

Recently Updated: New Placement Papers added.
Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Programming & Source Codes | GRE Preparation | Jobs, Discussions | Software Listing | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | International Business Information | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | FAQs | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Excellent Mobiles | Software Testing | Interview Questions | Freshers Jobs | Server Insiders | File Extension Directory

Copyright ©2003-2025 Vyom Technosoft Pvt. Ltd., All Rights Reserved. Read our Privacy Policy