0% found this document useful (0 votes)
6 views

php

The document is an examination paper for the I-VI Diploma Exam 2023 in Computer Science & Engineering, specifically focusing on Web Based Applications. It consists of multiple-choice questions and descriptive questions covering various PHP concepts, including session management, object-oriented programming, error handling, and database connections. The exam is structured into three groups, with all questions being compulsory and a total of 70 marks available.

Uploaded by

adityarajmgr61
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
6 views

php

The document is an examination paper for the I-VI Diploma Exam 2023 in Computer Science & Engineering, specifically focusing on Web Based Applications. It consists of multiple-choice questions and descriptive questions covering various PHP concepts, including session management, object-oriented programming, error handling, and database connections. The exam is structured into three groups, with all questions being compulsory and a total of 70 marks available.

Uploaded by

adityarajmgr61
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 5
Roll No: I-VI Diploma Exam 2023 (Even) (Computer Science & Engineering) (Theory) 3:00 Hours} ‘Web Based Application (20186031 ) Full, Marks: 70], + All questions are compulsory. (@afr ra aferare 1) Marks are mentioned on the right side of each question, (3iar Haft eat aang aite3iftra Pk BI) Group (A) (5-2) Q.1 Choose the most suitable answer the following options. (120-20) relies seer Faeroe fa) = i. Whatis the purpose of web page validation? (aaa eae arse are) : (ao secre the web page fom unauthorized access _(e) To improve the performance of the web page Griiga aa ata tara aR (deta reais gue (b) To check the correcthess and completeness of user input (d) To enhance the visual appeal of the web page (soar gage ater a pra Arse) tar reat aN agra ii. Whatis he purpose of using cookies? ar ar era ee a SRT aT) (2) To store user preferences and session data (To display advertisements on the web page (sahara arated ate a Ber sata me Re) array Fama wate nT Fa) ()To perform server-side calelations (@) To validate user input on the cient side | accags aera at & Fa) range args se seater gage A ATT aT ET 4 fam 2 ‘What attribute is used to specify the expiration time of a cookie? car hr eran fter sre fave ange Fore eta ar Pare waar Ay STAT eD) (2) maxcage (BRET HTD (expires (HAT) ——_(e) domain BHF (6) path 2) iv, How do you sta a session in PHP? (PHP Aa RRA) (a) session_start (session_stan() ATSTCAAT RY ()create_session()(create_session() 1 Saher wy ‘s(b) start session() (star session() aT Setar ah) (4) open_session() (open_session() #1 STANT AY) ¥. Which funetion is used to send an email in PHP? fara sora amr suri aces Pup H Seer SYST oT) (a) mail) FAY) | (b) send_mail() (SAS) (6) create_emaill) (ATE AeI)) (a) email_send() aa Hy) Page 1 of 5 ue FDANBADSCSESSAASCOOADIONLTA “ vie How do you destroy a session in PHP? (Pi A aa at 8 gaea HY) 8) seston destroy (session. dstoy( TEAR (bend session) (end session) a SANT a) vii. Whats introspection in PHP? (PHP 3 eehetaera eat 8) (a) The process of creating a new object (aren steshre ser & oRFaM) (8) The process of cloning an object (Siesta ft eatin afrem viii, What is serialization in PHP? (PHP 4 Ragactareer ea 87) (a) The process of converting an object into a string representation (sliestee #t Reda afevorr # oRtalda at fr sre (©) close_session() (close_session() I S4arT aH (d) destroy_session() (destroy_session() aT Sahar wh) (6) The process of examining the type of an object at runtine | CaeIgr sttetae & want A sia A FRAT E (a) The process of overriding a method in a child class. | (aera A ea ars a Stags HA A aA (©) The process of overriding a method in a class (men uw Hers a aitacags we A fea, (b) The process of creating anew object (d) The process of cloning an object é Grn attests wait A aT) Giese fr eateiar sae ix. What i the purpose of overriding a method in PHP? (PHP # Hers Hy sterergs we HT SAT aT hy) (a) To create a new method with a different name (c} To destroy an object (Ca Ae AYS BI Um STAT Te ae AAC) Giese wt are Ret Hae) (b) To modify the implementation of a method in parent class (€) To create anew object Fre RT aT A a AS FCAT aT RAAT RT) GTM steere ae & re) X. What isthe purpose of the destructor method in PHP? (PHP a egaet Aus aH stea aT) (2) To create an object ofa class (©) To override a method in a class (om maT a aesae we & FC) (Hand wa Aue a stags aA HAA) (6) To destroy an object (2) To perform mathematical calculations (cm attetae rae Fat FAC) (afore sore aah Fe) xi, What is the purpose of the implode() function in PHP? (PHP # implode() tareret ar Skea war 7) (a) To split string into an array (©) To reverse the order of elements in an array (Rar at va ota Rano ae & fae), (OCA aeat hat a Sect TH AAT) (b) To combine array elements into a string (@) To count the number of elements in an array (tara ah war Rear Pra Fe) (RA cea A em Fra Ra aT) | 211, Whats the correct syntax to access an element in an associative array? (wenfereita ot A area arr Sra He & fare wer Pea aa By) (a) Satray key] (SM) (by Sarray they}(CECESM) () Sarray hey] (CEES (d) Sarray(key) (OREM) Page 2 of § (201ss0: HESEEDIBBADSCSESSASKCOOAIOITA, we Which function combines to strings to create a new string? (cataarr erart 2h ear ey aT way ara FPEAT aera BP) (b) sttpos() (stfpos}))—__()strrev() (strrev()) (4) implode() implode) (a) streplace() (strreplace()) What is the purpose of the stroupper() function in PHP? xiv (PHP 3 stroupper() Serer #1 3A FAT EI) (©) To convert a string to uppercase (a) To convert a string to lowercase (Beara atarcha a aRaklr wes HAC) Segara arrcha A ftateter ort & Fare) (b) To count the number of words ina string (4) To reverse the order of characters ina string (Aa erech a aoe Hr aT TAH AAT) (FRET a arene arama BY Sect eA Fae) 3¥. What does PHP stand for? (PHP 31 arto aar 8?) (@) Personal Home Page (=a eare 8 7) (c) Preprocessed Hypertext Pages (SMAeS ETTORE 8H) 1+ (b) Hypertext Preprocessor (BTESTEFEE MBN) (d) Programmed Hypertext Processor (SMATAS BTETTEATE ETD xvi, Which of the following methods is used to declare variables? (fra faeafetirs Pattat a saat aftvace ft ateor & fare fra sar 2) (a) declare (Biftret Y) (b) var (RE) (c) dim (fa) 9(d) $ (Bt) Which data type is used to store whole numbers in PHP? (PHP % garter sears at arte art & Fore tere Ber sea sat Pear Sa 8?) (a) string (FRE {0 float (rahe) (©) boolean af@ra) (4) imeger ERD xviii, What is the result of the following expression: 10 + "5"? (fereafetaae extort ar after ear gta, 10 +75") (1505) (by"108" 105") gotosc10s) (enor) XX. Which statement is used in loop termination? (Te Ekstra Baer & swt fra TAT? ) {or break) (b) continue (HERA) —_ (FGA) (a) else area Which loop structure in PHP allows code to be executed repeatedly based on a condition? (PHP Hater ar a ata Hts Ht was PRae a ITU a aA oarfeare et ar area Se 8) (a) for loop (FIT AT) (b) while loop (ATF IT) (c) do-while loop (Z-21F7 FT) (A) switch loop (FETA AT) Group (B) (qa -) Q.2 How do you start a PHP block of code? 4 (Sree ars cotter art aireat aa he) OR QnA ‘What is the purpose of functions in PHP? 4 (herr Hi erereret aT Skea aT BP) Page 30fS (20186038) TAFWFDEBBADSCSEO5AS8CO9ADOON ITA as Q6 What isthe use of the "GET" and "S_POST* variables in PHP? “S_POST aftvaee ar saat Fat 87) OR Grrr Explain the concept of "include" and “require” in PHP, (Hea include” IR “require” a reareor a PaerOT at) ‘What are parameters and return values in PHP functions? oS sree srr trot ate Pet aya aha) OR Grr What is the "foreach” loop used for in PHP? (Stora foreach” AT aT Seer FAT) What isthe diference between “while” and “for loops in PHP? (HHA while” SH for” EAI ieee TATED) OR Grr How do you handle user input in PHP? (Shea at sccharact gene at td ze) How do you use the “else” statement in PHP? (Sree H "else" eect a saa a HI) OR (rer How do you access elements of an array in PHP? (Sheath 3 ee et seat aw A SEAT ST) Group (C) (a - #) Question: What is object-oriented programming (OOP) in PHP? Explain the concepts of classes, objects, inheritance, and polymorphism with suitable examples. (cree 3 tech. sheets senfeiar shai war feta sereeet rer eT, steshee, REA, st affaaititaaa ft sratrcord aoe) On (area) Describe the process of sending emails using PHP. Implement a simple PHP script that sends an email with user-provided data, ctr apr sere ase Gatar Sara A ora a ear awe) Sattar Carer vara Pow are Ber as AT a Se Ta ae Us Aa heath Pace HT se BT) How can you implement form validation in PHP to ensure thatthe user inputs the correct data? Provide ‘examples of validating common form fields like email, numbers, and pasSwords,~— (rece int aera a aye cs Sera EY eT ND Sate, ae aA oTeaS STATA said tes Sera serge ere EI) OR Gran ‘What is MySQL, and how do you establish a connection to a MySQL. database in PHP? Provide examples of basic SQL queries to retrieve data from a database, (rargenTettre Toa aT EST Seer A CoH ATGAATIS THA SETA HA SHST SATA #? AAR SOL, apart ay sarecor wera we foree Serdar S er sea Pea ST AAA BI) Page 4 of 5 cot AESEDIBBADSCSESSAASCOPADIOR ITA, How do you handle errors and exceptions in PHP? Explain the use of try-catch blocks and error reporting, Qo swith examples, eet 3 fait fhe reas oa Are aT eT errr ae she BE RHE aT sah arg) on rr 6 ‘@ What are sessions and cookies in PHP? Explain their significance and how to use them to maintain user state across multiple requests. (chee 2} Sere atte Por aa BY ara Ee waeATE athe Sek surah ety serach Pe ATE greeted a ater eer eae a POT) 10 Explain the concept of file handling in PHP. Describe how to read from and wri to files, along wth 6 examples pmol ha a (circerch & srg fir ay areca amt raga | eTOH Ay eT TTB eT a FTA aT FT ath or Grea ‘What is the significance of functions in PHP? Explain how to create user-defined functions and builtin 6 functions with examples. ae . Si i (creer 3 sare a eee a 7 BPR Se eT Sere Ret weTT a PST soe ha aa, 3 ATE) 11 How do you work with arrays in PHP? Explain how to create, acéess, modify, and loop through atiays 6 with suitable examples. . ae 7 (cere a 0 Be rer ae sat Pave SATA SAR STR a HME OLA ATE, THE IE, NTT HE, seas dy rere & Rone wt ar aera OR Geran What are PHP loops? Describe the “while,” "do-whie,” "for." and “foreach” loops with examples and 6 explain the differences between them. 7 (career ea ara NP STEHT hile” “dosh,” "or." IE foreach” ET aT TET AE athe sat sient ah gee) (20186038), Page $ of 5 TAEAFFDIBBADSCSEDSAASCOOAOMISITA

You might also like