PPSC Computer Science Full Book test With Answers

PPSC Computer Science Full Book test

Sr. # Questions Answers Choice
1 To work with remote files in PHP you need to enable. Allow _url _fopen Allow _ remote_files Both of above None
2 The function setcookie () is used to. Enable or disable cookie support Declare cookie variables Store data in cookie variable All of above
3 Which of the following mode of fopen () function opens a file only for writing if a file with that name does not exist, attempts to create a new file, If the file exist , place the file pointer at the end of the file after all other data. W W+ A A+
4 Which of the following method is suitable when you need to send larger form submissions. Get Post Both Get and post None of above
5 Which of the following method sends input to a script via a URL. Get Post Both None
6 The difference between include ( ) and require() Are different how they handle failure Both are same in every aspects Is include () produced a fatal error while require results in a warning. None
7 A variable $word is set to "HELLO WORLD" which of the following script returns in title case. Echo uc words ($word) Echo uc words (strtolower ($word) Echo uc first ($word) None of above
8 When you need to obtain the ASCII value of a character which of the following unction you apply in PHP. chr ( ): ace ( ): ord ( ): Val ( ):
9 Which of the following function returns the number of character in a string variable. Count ($ variable) Len ($variable) Strcount ($variable) Strien ($variable)
10 You can define a constant by using the define () function Once a constant is defined. It can never the changed of underdefined It can never be changed but can be undefined. It can be changed but can not be undefined It can be changed and can be undefined
11 Which of the following variables is not a predefined variable. $get $ask #reuest #post
12 Which of the following is not true. PHP can be used to develop web application PHP makes a website dynamic PHP applications can not be complied PHP can not be embedded into html
13 PHP is widely used ____ scriting language that is especially suited for web development and can be embedded into html. Open source general purpose Proprietary general purpose Open source special purpose Proprietary special purpose
14 When compared to the compiled program scripts run Faster Slower The execution speed in similar All of above
15 A script is a Program or sequence of instructions that is interpreted of carried out by processor directly Program or sequence of instruction that is interpreted or carried out by another program Program or sequence of instruction that is interpreted or carried out by web server only None
16 Which of the following is "stringzizing operator"? $ % # ?
17 Which of the following functions are used in unformatted data files. Fscanf Fwrite Fread fscanf & fwrite
18 Write the last element of the following array.
Char flag [] =" FALSE"
E e /O \O
19 If you declare an array without stating the elements it will be set to A null value Zero Garbage value Set of words
20 In mixed mode expressions. Operands of lower type get automatically converted to higher type Operands of higher type get automatically converted to lower type. Operands of higher and lower type get in there changed Operands of lower type get automatically converted to lower type.
21 The storage class of a local variable is Auto Static Extern Register
22 Which of the following is an advantage of using macros over functions. Functions must have parameters, macros do not The code associated with a function is expanded in line Values passed to function must be of specific data type The code associated with a function is not expanded in line.
23 Multiple macro can be defined by placing _____ at teh end of each line except the last. / \ # $
24 The getchar ()function reads a String from a file Character from a file String from the key board Character from the keyboard
25 A function protoype is A definition of the function a declaration statement in the called program A declaration statement in the called program A function call in the program
26 The header file contains the function prototypes to the standard input /output library functions and information used by them. <std I/O .h> <stdio .h> < stdib.h> <studio.h>
27 How many characters can is string hold when declared as char name [20];? 18 19 20 21
28 What is the reslutl of the expression 6+12*3 -4/2? 22 25 40 45
29 The benefit of using enumeration data types in a program is Program becomes shorter Program becomes longer Program is easy to understand Program become complex
30 When a program is running the value of a constant Can be changed Cannot be used I always hidden Cannot be changed
Download This Set

Is this page helpful?