Technology Questions

Q:

What are the advantages of using friend classes?

Answer

- Friend classes are useful when a class wants to hide features from users which are needed only by another, tightly coupled class. 


- Implementation details can be kept safe by providing friend status to a tightly cohesive class.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 3831
Q:

Explain storage qualifiers in C++

Answer

i.) Const - This variable means that if the memory is initialised once, it should not be altered by a program. 


ii.) Volatile - This variable means that the value in the memory location can be altered even though nothing in the program code modifies the contents. 


iii.) Mutable - This variable means that a particular member of a structure or class can be altered even if a particular structure variable, class, or class member function is constant.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

1 3807
Q:

Write a c program for bubble sort.

Answer

#include<stdio.h>
int main(){

  int s,temp,i,j,a[20];

  printf("Enter total numbers of elements: ");
  scanf("%d",&s);

  printf("Enter %d elements: ",s);
  for(i=0;i<s;i++)
      scanf("%d",&a[i]);

  //Bubble sorting algorithm
  for(i=s-2;i>=0;i--){
      for(j=0;j<=i;j++){
           if(a[j]>a[j+1]){
               temp=a[j];
              a[j]=a[j+1];
              a[j+1]=temp;
           }
      }
  }

  printf("After sorting: ");
  for(i=0;i<s;i++)
      printf(" %d",a[i]);

  return 0;
}

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

0 3806
Q:

Write SQL Query to find second highest salary of Employee.

Answer

There are many ways to find second highest salary of Employee in SQL, you can either use SQL Join or Subquery to solve this problem. Here is SQL query using Subquery :


SELECT MAX(Salary) from Employee WHERE Salary NOT IN (select MAX(Salary) FROM Employee );

Report Error

View answer Workspace Report Error Discuss

Subject: SQL

2 3799
Q:

How many validation controls are available in ASP.NET AJAX 4.0?

Answer

The following validation controls are available in ASP.NET AJAX 4.0:




        => FilteredTextBoxExtender - Enables you to apply filtering to a text box.

        => MaskedEditExtender and MaskedEditValidator - Restricts a user to enter only a certain pattern of characters in the TextBox by applying a mask to the input.

        => ValidatorCalloutExtender - Attaches to the ASP.NET validators so that the error messages are not displayed as a simple text but as a balloon-style ToolTip.

        => NoBot - Prevents the spam/bot from filling the input forms automatically and uses the Completely Automated Public Turing test to tell Computers and Humans Apart (CAPTCHA), which is a type of challenge-response test to ensure that the response is not generated by the computer.

        => PasswordStrengthExtender - Measures the strength of the password text entered within the text box by validating with the different strength specified parameters

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 3796
Q:

What COBOL construct is the COBOL II EVALUATE meant to replace?

Answer

EVALUATE can be used in place of the nested IF THEN ELSE statements.

Report Error

View answer Workspace Report Error Discuss

0 3791
Q:

The SQL SELECT statement is capable of

A) Projection B) Selection
C) Protection & Security D) Both A & B
 
Answer & Explanation Answer: D) Both A & B

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: SQL
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

2 3790
Q:

What does inheriatance allows you to do?

A) create a class B) access methods
C) create a hierarchy of classes D) None of the mentioned
 
Answer & Explanation Answer: C) create a hierarchy of classes

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: C++

1 3785