1.What is the output of the following program fragment:int find(int a, int b, int c){ int temp; c = a + b;temp = a; a = b; b = 2 * temp; return b; } int main(){ int x, y, z; x = 15; y = 25; z = 30; printf(“%d %d %d %d\ n”,x,y,z,find(x,y,z));
2.#include<stdio.h> void fun() { static int x; printf("%d ", x); x = x + 1; } int main() { fun(); fun(); return 0; } What will be output of this?
3.How many times will the loop bodies execute in the following loops? A. int x = 4, y = 50; do{x += 8;} while(x < y);
3.How many times will the loop bodies execute in the following loops? H. for (int i=1; i<=3;i+=1) for (int j=1;j<=4;j++){ if (j==3) Continue; for (int k=2;k<=4;k++) printf("Hello \n"); }
4.In CPP, members of a class are ______ by default.
5. What is the right way to access value of structure variable book{ price, page }?
Page-2
6. The statement print f ("%d", 10 ? 0 ? 5 : 1 : 12); will print?
7. What will be the output of the following statements ?int a = 4, b = 7,c; c = a = = b; printf("%i",c);
8.What will be the output of the following program ?#include void main() { int a = 2; switch(a) { case 1: printf("goodbye"); break; case 2: continue; case 3: printf("bye"); } }
9.What of the following sorting procedure is the slowest?
10.Which of the following is not fundamental process involved for loader?
Page-3
11.Which of the following is correct declaration for a pointer to a function that returns a float ?
12.The symbol << :
13.Which of the following is not command of DML section of SQL ?
14.What is output of the following code fragment? int val,res,n=1000; val=2000; res=n+val>1750?400:200 ; cout<< res;
15.Take a look of following programme. What will be the output of it? #include using namespace std; int main() { int numbers[5], sum = 0; cout << "Enter 5 numbers: "; for (int i = 0; i < 5; ++i) { cin >> numbers[i]; sum += numbers[i]; } cout << "Sum = " << sum << endl; return 0; }
Page-4
16 What is output of following programme #include <iostream.h> int globalVar = 2; int main() { int globalVar = 5; cout<<” Output = “<<::globalVar; }
17. a=5.0 b=2 then what is a%b = ?
18. a = 5; b=6; what is value of #a and #b after ++a , b-- ?
19. What is output of following programme void printFunc(int a,int b,int c) { a *=2; b *=2; c *=2; } int main() { int x = 1,y=3,z=4; printFunc(x,y,z); cout<<”x = “<<x<<”\ny = “<<y<<”\nz = “<<z; }
20. Does C++ support Multilevel and Multiple Inheritances?
Page-5
21.What is output of following Programme #include <stdio.h> #define start main int start() { printf("Hello, World!\n"); return -6; }
22. In the __________ normal form, a composite attribute is converted to individual attributes.
23.From following database languages in which type “TRUNCATE” command is used?
Table – EmployeeDetails EmpId FullName ManagerId DateOfJoining City 121 John Snow 321 01/31/2014 Toronto 321 Walter White 986 01/30/2015 California 421 Kuldeep Rana 876 27/11/2016 New Delhi Table – EmployeeSalary EmpId Project Salary Variable 121 P1 8000 500 321 P2 10000 1000 421 P1 12000 0 24 Write an Query to fetch those employees who live in Toronto and work under manager with ManagerId – 321.
25. Write an SQL query to fetch all those employees who work on Project other than P1.
Page-6
26. Write an SQL query to fetch the count of employees working in project ‘P1’.
31. How can you convert the string of any base to integer in JavaScript?
27. Write a SQL query to Find second Highest salary ?
28. Which list type is available in HTML?
29. Which attribute is used to make input tag value mandatory ?
30. Write a code to design following output using <table>