116
84.2k
Chapter:

30+ Function and String in PHP Solved MCQs

in Web Technologies

These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Bachelor of Business Administration in Computer Applications (BBA [CA]) .

Chapters

Chapter: Function and String in PHP
1.

Which data type value is returned by all transcendental math functions?

A. int
B. float
C. double
D. long
Answer» C. double
2.

Which of these values can a boolean variable contain?

A. true & false
B. 0 & 1
C. any integer value
D. true
Answer» A. true & false
3.

Decrement operator, −−, decreases the value of variable by what number?

A. 1
B. 2
C. 3
D. 4
Answer» A. 1
4.

Which right shift operator preserves the sign of the value?

A. <<
B. >>
C. <<=
D. >>=
Answer» B. >>
5.

What is the output of relational operators?

A. integer
B. boolean
C. characters
D. double
Answer» B. boolean
6.

. Which of these is returned by “greater than”, “less than” and “equal to” operators?

A. integers
B. floating – point numbers
C. boolean
D. none of the mentioned
Answer» C. boolean
7.

Which of these jump statements can skip processing the remainder of the code in its body for a particular iteration?

A. break
B. return
C. exit
D. continue
Answer» D. continue
8.

Which of the following is not a decision making statement?

A. if
B. if-else
C. switch
D. do-while
Answer» D. do-while
9.

Which of the following is not a valid flow control statement?

A. exit()
B. break
C. continue
D. return
Answer» A. exit()
10.

What is the range of short data type in Java script ?

A. -128 to 127
B. -32768 to 32767
C. -2147483648 to 2147483647
D. none of the mentioned
Answer» B. -32768 to 32767
11.

What is the range of byte data type in Java script?

A. -128 to 127
B. -32768 to 32767
C. -2147483648 to 2147483647
D. none of the mentioned
Answer» A. -128 to 127
12.

An expression involving byte, int, and literal numbers is promoted to which of these?

A. int
B. long
C. byte
D. float
Answer» A. int
13.

What is the numerical range of a char data type in Java script?

A. -128 to 127
B. 0 to 256
C. 0 to 32767
D. 0 to 65535
Answer» D. 0 to 65535
14.

Which of these coding types is used for data type characters in Java script?

A. ascii
B. iso-latin-1
C. unicode
D. none of the mentioned
Answer» C. unicode
15.

Which one is a valid declaration of a Boolean?

A. boolean b1 = 1;
B. boolean b2 = ‘false’;
C. boolean b3 = false;
D. boolean b4 = ‘true’
Answer» C. boolean b3 = false;
16.

Which of these operators is used to allocate memory to array variable in Java script?

A. malloc
B. alloc
C. new
D. new malloc
Answer» C. new
17.

Which of these is an incorrect array declaration?

A. intarr[] = new int[5]
B. int [] arr = new int[5]
C. intarr[] = new int[5]
D. intarr[] = int [5] new
Answer» D. intarr[] = int [5] new
18.

Which of these is necessary to specify at time of array initialization?

A. row
B. column
C. both row and column
D. none of the mentioned
Answer» A. row
19.

Which of the following can be operands of arithmetic operators?

A. numeric
B. boolean
C. characters
D. both numeric & characters
Answer» D. both numeric & characters
20.

Modulus operator, %, can be applied to which of these?

A. integers
B. floating – point numbers
C. both integers and floating – point numbers
D. none of the mentioned
Answer» C. both integers and floating – point numbers
21.

Which operator is used to invert all the digits in a binary representation of a number?

A. ~
B. <<<
C. >>>
D. ^
Answer» A. ~
22.

On applying Left shift operator, <<, on integer bits are lost one they are shifted past which position bit?

A. 1
B. 32
C. 33
D. 31
Answer» D. 31
23.

Which of these operators can skip evaluating right hand operand?

A. !
B. none of the mentioned
C. &
D. &&
Answer» D. &&
24.

Which of these have highest precedence?

A. ()
B. ++
C. *
D. >>
Answer» A. ()
25.

Which of these statements are incorrect?

A. equal to operator has least precedence
B. brackets () have highest precedence
C. division operator, /, has higher precedence than multiplication operator
D. addition operator, +, and subtraction operator have equal precedence
Answer» D. addition operator, +, and subtraction operator have equal precedence
26.

Which of these selection statements test only for equality?

A. if
B. switch
C. if & switch
D. none of the mentioned
Answer» B. switch
27.

. Which of these are selection statements in Java script?

A. if()
B. for()
C. continue
D. break
Answer» A. if()
28.

Which of the following is not a valid jump statement?

A. break
B. goto
C. continue
D. return
Answer» D. return
29.

_______is the measured as the amount of data that can be transferred from one point to another point within a specific amount of time.

A. http
B. bandwidth
C. webpage
D. dream viewer
Answer» B. bandwidth
30.

A ___________ is a document, typically written in plain text distributed with formatting instruction of Hypertext markup languages like HTML,XHTML

A. http
B. bandwidth
C. webpage
D. dream viewer
Answer» C. webpage
31.

___________ Stands for Hypertext markup languages for displaying web pages and other information that can be displayed in a web browser

A. http
B. bandwidth
C. webpage
D. dream viewer
Answer» A. http
32.

Cost of buying and running a server for client serve model are high .

A. true
B. false
C. both a & b
D. none of these
Answer» A. true
33.

Following are the types of CSS , which one is not type of CSS.

A. inline css:
B. internal or embedded css
C. external css:
D. none of these.
Answer» D. none of these.

Done Studing? Take A Test.

Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.