[ PHP Programming MCQS ]

झारखंड में आयोजित होने वाली JPSC, JSSC, JET, झारखंड पुलिस भर्ती परीक्षा आदि के लिए उपयोगी सामान्य अध्ययन।

[ PHP Programming MCQS ]

Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
381. Directory Traversal Attack का उद्देश्य क्या है?
[A] Access Restricted Files
[B] Increase Speed
[C] Compress Images
[D] Generate Tokens
381. What is the purpose of a Directory Traversal Attack?
[A] Access Restricted Files
[B] Increase Speed
[C] Compress Images
[D] Generate Tokens
सही उत्तर: Access Restricted Files
व्याख्या: Unauthorized file access प्राप्त करना।
Correct Answer: Access Restricted Files
Explanation: Attempts unauthorized file access.
382. Cryptography में Encryption का उद्देश्य क्या है?
[A] Protect Confidential Data
[B] Increase Database Size
[C] Delete Files
[D] Create Sessions
382. What is the purpose of Encryption in Cryptography?
[A] Protect Confidential Data
[B] Increase Database Size
[C] Delete Files
[D] Create Sessions
सही उत्तर: Protect Confidential Data
व्याख्या: Sensitive information सुरक्षित रखना।
Correct Answer: Protect Confidential Data
Explanation: Protects sensitive information.
383. Symmetric Encryption में क्या उपयोग होता है?
[A] Same Key
[B] Two Different Keys
[C] No Key
[D] Three Keys
383. What is used in Symmetric Encryption?
[A] Same Key
[B] Two Different Keys
[C] No Key
[D] Three Keys
सही उत्तर: Same Key
व्याख्या: Encryption और decryption के लिए एक ही key।
Correct Answer: Same Key
Explanation: Uses the same key for encryption and decryption.
384. Asymmetric Encryption में कौन-सी key pair होती है?
[A] Public and Private Key
[B] Read and Write Key
[C] Session and Cookie Key
[D] Hash and Salt Key
384. Which key pair is used in Asymmetric Encryption?
[A] Public and Private Key
[B] Read and Write Key
[C] Session and Cookie Key
[D] Hash and Salt Key
सही उत्तर: Public and Private Key
व्याख्या: Public key encryption और private key decryption।
Correct Answer: Public and Private Key
Explanation: Uses public and private keys.
385. Hashing और Encryption में मुख्य अंतर क्या है?
[A] Hashing One-Way है
[B] दोनों Same हैं
[C] Encryption One-Way है
[D] कोई अंतर नहीं
385. What is the main difference between Hashing and Encryption?
[A] Hashing is One-Way
[B] Both are Same
[C] Encryption is One-Way
[D] No Difference
सही उत्तर: Hashing One-Way है
व्याख्या: Hashing reverse नहीं की जा सकती जबकि encryption decrypt हो सकती है।
Correct Answer: Hashing is One-Way
Explanation: Hashing cannot be reversed, encryption can be decrypted.
386. Security Headers में Content-Security-Policy (CSP) का उद्देश्य क्या है?
[A] Mitigate XSS Attacks
[B] Increase Session Time
[C] Compress Files
[D] Store Cookies
386. What is the purpose of Content-Security-Policy (CSP)?
[A] Mitigate XSS Attacks
[B] Increase Session Time
[C] Compress Files
[D] Store Cookies
सही उत्तर: Mitigate XSS Attacks
व्याख्या: Browser को trusted content sources बताता है।
Correct Answer: Mitigate XSS Attacks
Explanation: Tells browsers which content sources are trusted.
387. PHP में echo 5 . 2; का output क्या होगा?
[A] 7
[B] 52
[C] 10
[D] Error
387. What is the output of echo 5 . 2; ?
[A] 7
[B] 52
[C] 10
[D] Error
सही उत्तर: 52
व्याख्या: Dot (.) string concatenation operator है।
Correct Answer: 52
Explanation: Dot operator performs string concatenation.
388. PHP में echo 5 + "10abc"; का output क्या होगा?
[A] 15
[B] 510abc
[C] Error
[D] 10
388. What is the output of echo 5 + "10abc"; ?
[A] 15
[B] 510abc
[C] Error
[D] 10
सही उत्तर: 15
व्याख्या: PHP numeric string के प्रारंभिक numeric भाग का उपयोग करता है।
Correct Answer: 15
Explanation: PHP uses the numeric portion at the beginning of the string.
389. PHP में कौन-सा operator strict comparison करता है?
[A] =
[B] ==
[C] ===
[D] !=
389. Which operator performs strict comparison in PHP?
[A] =
[B] ==
[C] ===
[D] !=
सही उत्तर: ===
व्याख्या: Value और type दोनों compare करता है।
Correct Answer: ===
Explanation: Compares both value and type.
390. isset($var) कब false return करेगा?
[A] Variable exists
[B] Variable NULL है
[C] Variable integer है
[D] Variable string है
390. When does isset($var) return false?
[A] Variable exists
[B] Variable is NULL
[C] Variable is integer
[D] Variable is string
सही उत्तर: Variable NULL है
व्याख्या: NULL variable पर isset false देता है।
Correct Answer: Variable is NULL
Explanation: Returns false when variable is NULL.