FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » [urgent] need solution of Questions, in context of PHP5
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: [urgent] need solution of Questions, in context of PHP5 [message #171585 is a reply to message #171582] Tue, 11 January 2011 12:37 Go to previous messageGo to previous message
spambait is currently offline  spambait
Messages: 35
Registered: September 2010
Karma:
Member
In article <943e47e8-a1b3-4895-9b77-847ea3f298e2(at)30g2000yql(dot)googlegroups(dot)com>, Abdul Qadir Memon <abdul(dot)qadirdeveloper(at)gmail(dot)com> wrote:
> I need the solution of the following questions in Context of PHP5.
>
>
> For the following code: <?php
> Function Expenses()
> {
> function Salary()
> {
> }
> function loan()
> {
> function Balance()
> {
> }
> }
> }
> ?>
>
> a. Expenses();Salary();Loan();Balance();
> b. Salary();Expenses();Loan();Balance();
> c. Expenses();Salary();Balance();Loan();
> d. Balance();Loan();Salary();Expenses();
>
> What will be the output of following code?
>
> $arr =3D "a";
> $arr[0]=3D"b";
> echo $arr;
> echo $arr[0];
>
>
> a. ab
> b. $arr is undefined
> c. bb
> d. Parse error
>
>
> Which of the following regular expressions can be used to check the
> validity of an e-mail address?
> A) ^[^@ ]+@[^@]+\.[^@ ]+$
> B) ^[^@ ]+@[^@]+.[^@ ]+$
> C) $[^@ ]+@[^@ ]+\.[^@ ]+^
> D) $[^@ ]+@[^@ ]+.[^@ ]+^
>
> Which of the following type cast in not correct?
>
> $fig=3D23;
> $varbl=3D(real)$fig;
> $varb2=3D(double)$fig;
> $varb3=3D(decimal)$fig;
> $varb4=3D(bool)$fig;
> ?>
>
> a. real
> b. double
> c. decimal
> d. Boolean
>
>
> which of the following is not a correct way of starting a session?
> a)session.auto_start
> b)session_register()
> c)session_initiate()
> d)session_start()
>
> the inbuilt function to get the number of parameter passed in:
> a)arg_num()
> b)func_args_count()
> c) func_num_args()
> d)none of the above
>
> which of the following is/are invalid data types in PHP?
> A) string
> b) integer
> c)float
> d)char
> e)array
> f)object
>
> you have a 2D array in PHP
> $array=3Darray(array(141,151,161),2,3,array(101,202,303));
> you want to display all the values in the array. The correct way is
>
> a. function DisplayArray($array){
> foreach($array as $value){
> if(array_valid($value)){
> DisplayArray($value);
> }else{
> echo $value. =93<br>=94;
> }
> }
> }
> DisplayArray($array);
> b. function DisplayArray($array){
> for($array as $value){
> if(valid_array($value)){
> DisplayArray($value);
> }else{
> echo $value. =93<br>=94;
> }
> }
> }
> DisplayArray($array);
>
> c. function DisplayArray($array){
> for($array as $value){
> if(is_array($value)){
> DisplayArray($value);
> }else{
> echo $value. =93<br>=94;
> }
> }
> }
> DisplayArray($array);
>
> d. function DisplayArray($array){
> foreach($array as $value){
> if(is_array($value)){
> DisplayArray($value);
> }else{
> echo $value. =93<br>=94;
> }
> }
> }
> DisplayArray($array);
>
>
> What will be the result of the following operations?
> Print 4<<5
> A 3
> B 128
> C 120
> D 6
>
> Which of the following is not true regarding XForms?
> a. PHP provides support for XForm
> b. It can be used on PDF documents
> c. The data is sent in XML format
> d. The action and method parameters are defined in the body
>
> What do u infer from the following code?
> <?PHP
> $str=3D=92Dear Customer,\nThanks for your query.We will reply very soon?
> \nCustomer Service Agent=92;
> print $str;
> ?>
> a) Only first \n character will be recognized and new line will be
> inserted.
> b) Last \n will not be recognized and only first two parts will come
> in new lines.
> c) All the \n will work and text will be printed on respective new
> lines.
> d) All will be printed on one line irrespective of the \n.
>
> Which of the following statements is true with regard to comparisons
> in PHP5?
>
>
> a. With "=3D =3D" operator, two object instances are equal if they have
> the same attributes and values, and are instances of a different
> class.
> b. With "=3D=3D" operator two object instances are equal if they have the
> same attributes and values, and are instances of the same class.
> c. With (=3D=3D=3D) operator, object variables are identical if and only if
> they refer to the same instance of the same class.
> d. With (=3D=3D=3D) operator, object variables are identical if and only if
> they refer to the different instance of the same class.
>
> Late PHP versions support remote file accessing for the functions:
>
>
> a. include()
> b. include_once()
> c. require_once()
> d. Both a and b
> e. Both b and c
>
>
> which of the following variables names are invalid
> a) $var_1
> b) $var1
> c) $var-1
> d) $var/1
> e) $v1
> consider the following two statements
> I- while($expr) statement
> II- while($exp): statement =85 endwhile;
> which of the following are true in context of the given statements?
> a) I is correct and II is wrong
> b) I is wrong and II is correct
> c) Both I & II are wrong
> d) Both I & II are correct
> How would you store order number (34) in an Order Cookie?
> a)setcookie(=93OrderCookie=94,34);
> b)makeCookie(=93OrderCookie=94,34);
> c)Cookie(=93OrderCookie=94,34);
> d)OrderCookie(34);
>
> which of the following functions output text?
> A) echo()
> B) print()
> C) println()
> D) display()
> which fo the following is not a file related function in PHP?
> a) fclose
> b) fopen
> c) fwrite
> d) fgets
> e) fappend
> what will be the output of the following code?
> <?PHP
> if(-1){
> echo(=93true=94);
> }else{
> echo(=93false=94);
> }
> a) true
> b) false
> what will be the output of the following script?
> $count=3D50;
> function Argument()
> {
> $count++;
> echo $count;
> }
> Argument();
> ?>
>
>
> a. It will print 50
> b. It will print 51
> c. It will print 52
> d. It will print 1
>
> which of the following is a ternary operator?
> a) &
> b) =3D
> c) :?
> d) ?:
> e) +=3D
> f) &&
> in your PHP application you need to open a file.you want the
> application to issue a warning and continue execution, in case the
> file is not found. The ideal function to be used is:
> a) include()
> b) require()
> c) nowarn()
> d) getfile(false)
> which of the following is not a valid PHP parser tag?
> a) script
> b) ?p
> c) %
> d) ?php
> which of the following does not represent logical AND operator in PHP?
> a) &
> b) &&
> c) And
> d) AND
> Which of the following are PHP file upload related functions?
> a) upload_file()
> b) is_uploaded_file()
> c) move_uploaded_file()
> d) none of the above
> which of the following printing contruct/function accepts multiple
> parameters?
> A) echo
> B) print
> C) printf
> D) all of the above
> which of the following are =91magic contants=92?
> a) __LINE__
> b) __FILE__
> c) __PRETTY_FUNCTION__
> d) __CLASS__
> e) __METHOD__
> which of the following variable declarations within a class is invalid
> in PHP5?
> a. private $type =3D 'moderate';
> b. var $term =3D3;
> c. public $amnt =3D '500';
> d. protected $name =3D 'Quantas Private Limited';
> the classes are defined as follows:
> Abstract class BaseCls(
> Protected abstract function getName();
> }
> Class childCls extends BaseCls{
> }
> Which of the following implementations of getName() in invalid in
> childCls?
>
> a. Protected function getName(){}
> b. Function getName(){}
> c. Private function getName(){}
> d. Public function getName(){}
>
> What will be the output of following code?
>
> $var1=3D"a";
> $$var1=3D"b";
> echo "$var1 $a";
>
>
> a. a b
> b. $var1 $a
> c. Error: $a is undefined
> d. Error: Parse error in line 2 ($$var1 =3D "b")
>
> Does PHP 5 support exceptions?
> a) yes
> b) no
> which composition data types are supported by php?
> a) array
> b) enumeration
> c) list
> d) Object
> e) Integer
> Which of the following is the correct way of specifying default value?
>
>
> a. function GetDiscount($Type =3D "Special") { . . . }
> b. function GetDiscount(Type :=3D "Special") { . . . }
> c. function GetDiscount($Type :=3D "Special") { . . . }
> d. function GetDiscount($Type : "Special") { . . . }
>
> The Manager and Office classes are as follows:
>
> class Manager{
> function printName() {
> echo "Manager";
> }
> }
> class Office{
> function getManager() {
> return new Manager();
> }
> }
>
> $ofc =3D new Office();
> ???
>
> ?>
>
> Which of the following should replace '???' to obtain the value of
> printName() function?
>
>
> a. $ofc->getManager()->printName();
> b. new Office()->getManager()->printName();
> c. $ofc->getManager->printName;
> d. Office::getManager()::printName();
> which of the following operator has the hieghest precedence?
> a) &
> b) %
> c) +
> d) &&
> e) +=3D
> what will be the output of the following code?
> $a=3D10;
> if($a > 5 OR < 15)
> echo =93true=94;
> else
> echo =93false=94;
> a) true
> b) false
> c) no output
> d) parse error
> Paamayim nekudotayim operator allows access only to the static members
> of a class?
>
> a. True
> b. False
> which of the following variables is not related to file uploads?
> a) max_file_size
> b) max_execution_time
> c) post_max_size
> d) input_time_max
> which of the following is not a predefined constant?
> a) true
> b) false
> c) null
> d) __file__
> e) constant
> Following is a php code block:
>
> $m=3D9;
> $n=3D99;
> $z=3D8;
> $z=3D$n++/$m++ + --$z;
> echo $z;
>
> what will be the output?
>
>
> a. 16
> b. 18
> c. 19
> d. 20
> e. 17
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Logic behind this?
Next Topic: part 2 - file exists not working
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 04:03:57 GMT 2024

Total time taken to generate the page: 0.04794 seconds