[ PHP Programming MCQS ]

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

[ PHP Programming MCQS ]

Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
411. PHP Code: echo strlen("Hello PHP"); Output क्या होगा?
[A] 8
[B] 9
[C] 10
[D] 11
411. PHP Code: echo strlen("Hello PHP"); What is the output?
[A] 8
[B] 9
[C] 10
[D] 11
सही उत्तर: 9
व्याख्या: Space सहित कुल 9 characters हैं।
Correct Answer: 9
Explanation: There are 9 characters including the space.
412. PHP Code: echo strrev("PHP"); Output क्या होगा?
[A] PHP
[B] PHPPHP
[C] PHP reversed
[D] PHP
412. PHP Code: echo strrev("PHP"); What is the output?
[A] PHP
[B] PHPPHP
[C] PHP reversed
[D] PHP
सही उत्तर: PHP
व्याख्या: PHP reverse करने पर भी PHP ही रहेगा।
Correct Answer: PHP
Explanation: Reversing PHP still results in PHP.
413. PHP Code: echo count([10,20,30,40]); Output क्या होगा?
[A] 3
[B] 4
[C] 5
[D] Error
413. PHP Code: echo count([10,20,30,40]); What is the output?
[A] 3
[B] 4
[C] 5
[D] Error
सही उत्तर: 4
व्याख्या: Array में 4 elements हैं।
Correct Answer: 4
Explanation: The array contains 4 elements.
414. PHP Code: echo max(5,9,2,15); Output क्या होगा?
[A] 9
[B] 15
[C] 5
[D] 2
414. PHP Code: echo max(5,9,2,15); What is the output?
[A] 9
[B] 15
[C] 5
[D] 2
सही उत्तर: 15
व्याख्या: max() सबसे बड़ी value return करता है।
Correct Answer: 15
Explanation: max() returns the largest value.
415. PHP Code: echo min(5,9,2,15); Output क्या होगा?
[A] 2
[B] 5
[C] 9
[D] 15
415. PHP Code: echo min(5,9,2,15); What is the output?
[A] 2
[B] 5
[C] 9
[D] 15
सही उत्तर: 2
व्याख्या: min() सबसे छोटी value return करता है।
Correct Answer: 2
Explanation: min() returns the smallest value.
416. PHP Code: $arr=[1,2,3]; array_push($arr,4); count($arr) का output क्या होगा?
[A] 3
[B] 4
[C] 5
[D] Error
416. PHP Code: $arr=[1,2,3]; array_push($arr,4); What is count($arr)?
[A] 3
[B] 4
[C] 5
[D] Error
सही उत्तर: 4
व्याख्या: array_push() नया element जोड़ता है।
Correct Answer: 4
Explanation: array_push() adds a new element.
417. PHP Code: echo abs(-25); Output क्या होगा?
[A] -25
[B] 25
[C] 0
[D] Error
417. PHP Code: echo abs(-25); What is the output?
[A] -25
[B] 25
[C] 0
[D] Error
सही उत्तर: 25
व्याख्या: abs() absolute value return करता है।
Correct Answer: 25
Explanation: abs() returns the absolute value.
418. PHP Code: echo ceil(4.2); Output क्या होगा?
[A] 4
[B] 5
[C] 4.2
[D] Error
418. PHP Code: echo ceil(4.2); What is the output?
[A] 4
[B] 5
[C] 4.2
[D] Error
सही उत्तर: 5
व्याख्या: ceil() next integer तक round up करता है।
Correct Answer: 5
Explanation: ceil() rounds up to the next integer.
419. PHP Code: echo floor(4.9); Output क्या होगा?
[A] 5
[B] 4
[C] 4.9
[D] Error
419. PHP Code: echo floor(4.9); What is the output?
[A] 5
[B] 4
[C] 4.9
[D] Error
सही उत्तर: 4
व्याख्या: floor() lower integer return करता है।
Correct Answer: 4
Explanation: floor() returns the lower integer.
420. PHP Code: echo round(4.5); Output क्या होगा?
[A] 4
[B] 4.5
[C] 5
[D] Error
420. PHP Code: echo round(4.5); What is the output?
[A] 4
[B] 4.5
[C] 5
[D] Error
सही उत्तर: 5
व्याख्या: round() nearest integer देता है।
Correct Answer: 5
Explanation: round() returns the nearest integer.