PHP Question
PHP Question
a) Interface
b) Object
c) Abstract class
d) Static class
Destructor has the same name as the constructor and it is preceded by ______ .
!
?
~
$
Which of the following advanced OOP features is/are not supported by PHP?
i) Method overloading
ii) Multiple Inheritance
iii) Namespaces
Object Cloning
What happens when we try to compile the class definition in following code snippet?
class Birds {};
class Peacock : protected Birds {};
What will be the result of combining a string with another data type in PHP?
A. int
B. float
C. string
D. double
1
5
13
0
In how many ways we can retrieve the data in the result set of MySQL using PHP?
mysql_fetch_row.
mysql_fetch_array
mysql_fetch_object
mysql_fetch_assoc
When function have same prototype in base class as well as in derived class function is called
Overloading function
Overriding function
Chained function
All of them
A process that converts a string of bytes in such a way that you can produce original data again, is known as
Synchronization
Specialization
Serialization
Parallelization
Which of the following statements is correct about the program given below?
class Bix
{
public:
static void MyFunction();
};
int main()
{
void(*ptr)() = &Bix::MyFunction;
return 0;
The program reports an error as pointer to member function cannot be defined outside the definition of class.
The program reports an error as pointer to static member function cannot be defined.
The program reports an error as pointer to member function cannot be defined without object.
The program reports linker error.
Find Output
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
char temp[20];
gcvt(23.45,2, temp);
printf("%s", temp);
return 0;}
(A) .4
(B) 23
(C) 23.45
(D) 23.
Find Output
int main()
{ int _ = 10;
int __ = 20;
int ___ = _ + __;
printf("__%d",___);
return 0; }
(A) Compilation Error
(B) Runtime Error
(C) __0
(D) __30
Find Output
//This question is compiled on 32 bit DEV-C++
int main()
{ char *ptr1, *ptr2;
printf("%d %d", sizeof(ptr1), sizeof(ptr2));
return 0; }
(A) 1 1
(B) 2 2
(C) 4 4
(D) Undefined
Find Output
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
char buffer[4];
itoa(123, buffer, 10);
printf("%s", buffer);
return 0;}
(A) 1234
(B) 12340
(C) 123
(D) 0
Find Output
void main()
{ printf(“\nab”);
printf(“\bsi”);
printf(“\rha”);
}
(A). absiha
(B). asiha
(C). haasi
(D). hai
c
d
a
b All right
c
d
a
b
d
c
b
d
a
c
d
d