[go: up one dir, main page]

0% found this document useful (0 votes)
11 views4 pages

Q3. What Is An Abstract Class?

The document contains a series of multiple-choice questions covering topics in programming and web development, including access specifiers in C#, function return types in C, abstract classes, SQL queries, HTML/CSS usage, and error handling in programming. Each question presents four options for the user to select the correct answer. The questions assess knowledge in various programming languages and concepts.

Uploaded by

Jitendra Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views4 pages

Q3. What Is An Abstract Class?

The document contains a series of multiple-choice questions covering topics in programming and web development, including access specifiers in C#, function return types in C, abstract classes, SQL queries, HTML/CSS usage, and error handling in programming. Each question presents four options for the user to select the correct answer. The questions assess knowledge in various programming languages and concepts.

Uploaded by

Jitendra Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Name :

Q1. Which of the following access specifier in C# allows a class to hide its member variables and member
functions from other functions and objects?
a. Public b. Private c. Protected d. Internal
Q2. In c programming a function can return ___________
a. Single value b. Double value
c. Many value d. all of the above
Q3. What is an abstract class?
a) A class that has direct instances, but whose descendants may have direct instances
b) A class that has direct instances, but whose descendants may not have direct instances
c) A class that has no direct instances, but whose descendants may have direct instances
d) All of the mentioned

Q4. Which one of the following is used to define the structure of the relation, deleting relations and relating
schemas?
a) DML
b) DDL
c) Query
d) Relational Schema

Q5. What is the output of the following piece of code?


public class array
{
public static void main(String args[])
{
int []arr = {1,2,3,4,5};
System.out.println(arr[5]);
}
}

a)4 b)5 c) ArrayIndexOutOfBoundsException d)


InavlidInputException

Q6. Trace the output.


int main()
{
   int i = 5;
   int *j;
   int **k;
   j=&i;
   k=&j;
   printf("%u %u %d ",k,*k,**k);
   return 0;
}

a. some address, some address, 5


b. some address, 5, 5
c. 5 , 5 , 5
d. None of the above
Q7. Correct way to define object of sample class in which code will work correctly is:

class abc
{
int i;
float k;
public abc(int ii, float kk)
{
i = ii;
k = kk;
}
}
a) abc s1 = new abc(1); b) abc s1 = new abc();
c) abc s2 = new abc(1.4f); d) abc s2 = new abc(1, 1.4f);

Q8. What will be the output of the following set of code?

{
int sum = 10;
try
{
int i;
for (i = -1; i < 3; ++i)
sum = (sum / i);
}
catch (ArithmeticException e)
{
Console.WriteLine("0");
}
Console.WriteLine(sum);
Console.ReadLine();
}
a)0 b)0 5 c)0-10 d) Compile time error

Q9.
main()
{
int x;
if ( x > 4) printf( “Brinda”);
else if ( x > 10) printf( “Karthik”);
else if ( x > 21 ) printf(“ Pradeep”);
else printf( “Sandeep”);
}

What will be the value of x so that “Karthik” will be printed? 


a. From 10 to 21
b. From 11 to 21
c. Grater then 10
d. None

Q10. If we want define style for an unique element, then which css selector will we use ?
a ) Id b)text c)class d)name

Q11. Consider the following set of relations

EMP ( emp_no,emp_name,dept_no,salary)
DEPT (dept_no,dept_name,location)
Write SQL query for the following
Find all the employees whose departments are located in 'Mumbai' and salary is greater than Rs. 20,000.

a. select emp_name from dept where dept_no and location='Mumbai';


b. select emp_name from emp where salary > 20,000 and dept_no in (select dept_no from dept where location
= 'Mumbai');
c. select dept_no ,count(emp_no) from emp where salary > 50,000 group by dept_no;
d. update table emp where emp_name='Mumbai';

Q12. What is the preferred way for adding a background color in HTML? 
a. <body background="yellow">
b. <background>yellow</background>
c. <body style="background-color:yellow">    
d. <background color="yellow">text<background>

Q13. In a Javascript Application what function can be used to send messages to users requesting for an text
input? 
a. Display()
b. Alert()
c. GetOutput()
d. Prompt()

Q14. Identify the count of mistakes in the following markup.


<html>
<head>
</head>
<body>
<li>
<ul><p>Hello</p></ul>
</li>
<br>
<hr>
</body>
</html>

a)2 b)3 c)1 d)0

Q15. What is the use of the ‘finally’ keyword?


a) It used to execute at the starting of the program
b) It will be executed at the end of the program even if the exception arised
c) It will be executed at the starting of the program even if the exception arised
d) none of the mentioned

You might also like