Welcome to your Yipee Technology Online Aptitude Test Name Email Phone Number 1. Which of the following statements is false about objects? Objects can access both static and instance data Object is the super class of all other classes Objects do not permit encapsulation An instance of a class is an object 2. If I don't provide any arguments on the command line, then the String array of main method will be empty or null or both? it is empty, but not null both null and empty It is null, but not empty depends on jre 3. Which of the following statements is true? An exception can be thrown by throws keyword explicitly. An exception can be thrown by throw keyword explicitly 4. What does PHP stand for? PHP: Hypertext Preprocessor Personal Hypertext Processor Private Home Page 5. SQL: How many objects will be created in the following code? String s1="Welcome"; String s2="Welcome"; String s3="Welcome"; One Three Zero Two 6. Consider c++ code given bellow and give output using namespace std; main(){ short unsigned int i = 0; cout<<i--; 65535 0 1 Compiler Error 7. The PHP syntax is most similar to: Perl and C VBScript JavaScript 8. Consider c code #define power(a) #a int main(){ printf("%d",*power(432)); return 0; } What will be printed? 52 *”432” 432 None of these 16 9. What is return type of malloc() function? int int* void* void 10. A technique for direct search is Hashing Tree Search Binary Search Linear Search 11. How do you create an array in PHP? $cars = "Volvo", "BMW", "Toyota"; $cars = array["Volvo", "BMW", "Toyota"]; $cars = array("Volvo", "BMW", "Toyota"); 12. What will be output if you will compile and execute the following c code? void main(){ int i=10; static int x=i; if(x==i) printf("Equal"); else if(x>i) printf("Greater than"); else printf("Less than"); } Greater than Compiler error Equal None of above Less than 13. Where Triggers are not allowed in MySQL database? After Delete none Before Update Before Insert 14. Consider c++ code given bellow and give output class abc { void f(); void g(); int x; }; main() { cout<<sizeof(abc)<<endl; 12 8 4 Compiler Error 15. Include files must have the file extension ".inc" True False 16. Answer True or False: main is keyword in Java. True False 17. Is there any difference between primary key and unique with NOT NULL condition? Yes No Depends on DBA 18. Find the output of following c code. #include int main(){ printf("C\question\bank"); return 0; cuestioank Cquestionbank cuestionank cquestioank 19. When using the POST method, variables are displayed in the URL: True False 20. What is the output of this C code? void foo(float *); int main(){ int i = 10, *p = &i; foo(&i); } void foo(float *p) { printf("%f\n", *p); } Undefined behaviour 0.000000 10.000000 Compile time error 21. #include void main(){ char *ptr=“abcd” char ch; ch = ++*ptr++; cout<<ch; } Output? d c b a 22. Java: Which methods can access to private attributes of a class? Only classes available in the same package. Only Static methods of the same class Only methods those defined in the same class Only instances of the same class 23. Size of void pointer is 2 byte 1 byte 8 byte 4 byte 24. What is use of \r in c? places cursor at the end of line used to insert a tab places cursor at the start of line used to insert a vertical tab 25. What will be printed if this is written in main() printf("%.0f", 2.89); 2 2.890000 2.89 3 26. How do you get information from a form that is submitted using the "get" method? Request.Form; Request.QueryString; $_GET[]; 27. What is the correct way to include the file "time.inc" in PHP? include file="time.inc" include file="time.inc"; include:"time.inc"; include "time.inc"; 28. Consider c code int main(){ printf("%d",sizeof(3.8)); return 0; } Which of the following is true? 8 4 None of these 10 Compiler Error 29. PHP can be run on Microsoft Windows IIS(Internet Information Server): False True 30. What is the correct way to create a function in PHP? function myFunction() create myFunction() new_function myFunction() Be sure to click Submit Quiz to see your results! Time's up