.
  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 » Novartis Placement Papers » Novartis Previous Year Placement Paper

 

Novartis Placement Paper -: PHP Questions With Answers


Advertisements
Advertisements




Novartis Previous Years Solved Sample Placement Papers

  1. Which of the following are correct ways of creating an array?
    (i) state[0] = “karnataka”;
    (ii) $state[] = array(“karnataka”);
    (iii) $state[0] = “karnataka”;
    (iv) $state = array(“karnataka”);

    A. (iii) and (iv)

    B. (ii) and (iii)

    C. Only (i)

    D. (ii), (iii) and (iv) Answer: Option A

  2. Solution: Correct ways of creating arrays are $state[0] = “karnataka” and $state = array(“karnataka”).
  3. What will be the output of the following PHP code?
    <?php
    $fruits = array("mango", "apple", "pear", "peach");
    $fruits = array_flip($fruits);
    echo ($fruits[0]);
    ?>

    A. mango

    B. Error

    C. peach

    D. 0 Answer: Option B

  4. Solution: The array_flip() function swaps keys with their associated values, and since "0" is not a valid key after flipping, it causes an error.
  5. What will be the output of the following PHP code?
    <?php
    $states = array("karnataka" => array("population" => "11,35,000", "captial" => "Bangalore"),
    "Tamil Nadu" => array("population" => "17,90,000", "captial" => "Chennai"));
    echo $states["karnataka"]["population"];
    ?>

    A. karnataka 11,35,000

    B. 11,35,000

    C. population 11,35,000

    D. karnataka population Answer: Option B

  6. Solution: The value of "population" under the "karnataka" key is directly accessed and printed.
  7. Which function can be used to move the pointer to the previous array position?

    A. last()

    B. before()

    C. prev()

    D. previous() Answer: Option C

  8. Solution: The prev() function moves the array pointer to the previous position.
  9. PHP is _____________ scripting Language?

    A. Server side

    B. Client side

    C. Middle side

    D. None of above Answer: Option A

  10. Solution: PHP is a server-side scripting language, executed on the server.
  11. PHP script is executed on?

    A. ISP Computer

    B. Server computer

    C. Client computer

    D. None of above Answer: Option B

  12. Solution: PHP scripts are executed on the server where the code resides.
  13. Which of the following variables is not a predefined variable?

    A. $get

    B. $ask

    C. $request

    D. $post Answer: Option B

  14. Solution: $ask is not a predefined PHP variable, unlike $get, $request, and $post.
  15. When you need to obtain the ASCII value of a character, which of the following function do you apply in PHP?

    A. chr()

    B. asc()

    C. ord()

    D. val() Answer: Option C

  16. Solution: The ord() function returns the ASCII value of the first character of a string.
  17. Which of the following method sends input to a script via a URL?

    A. Get

    B. Post

    C. Both

    D. None Answer: Option A

  18. Solution: The GET method appends the data to the URL.
  19. Which of the following function returns a text in title case from a variable?

    A. ucwords($var)

    B. upper($var)

    C. toupper($var)

    D. ucword($var) Answer: Option A

  20. Solution: The ucwords() function capitalizes the first letter of each word in a string.
  21. Which of the following function returns the number of characters in a string variable?

    A. count($variable)

    B. len($variable)

    C. strcount($variable)

    D. strlen($variable) Answer: Option D

  22. Solution: The strlen() function returns the length of a string.
  23. Which of the following are not considered as Boolean false?

    a. FALSE

    b. 0

    c. “0”

    d. “FALSE”

    e. 1

    f. NULL Answer: d and e

  24. Solution: "FALSE" and 1 are not considered Boolean false.
  25. Which of the following multithreaded servers allow PHP as a plug-in?

    a. Netscape FastTrack

    b. Microsoft’s Internet Information Server

    c. O’Reilly’s WebSite Pro

    d. All of the above Answer: Option D

  26. Solution: All the listed servers allow PHP as a plug-in.




 


.

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-2024 Vyom Technosoft Pvt. Ltd., All Rights Reserved. Read our Privacy Policy