Technology Questions

Q:

Write an algorithm to separate all ones & zeroes in an array.

Answer

1. Have two indexes pointing to two ends of array, say i and j.


2. Approach towards each other with a check condition that they dont cross each other.


3. Each iteration of while loop, swap the numbers pointed by two indexes when num[i] index number is not equal to 1.


 


void sort()


{


     int a[]={1,0,0,0,1,1,0,1,0,1,0,0,1,0};


     int i=0;


     int j=13;


     int temp;


      while(j>i)


     {


          if(a[i]==1)


                 i++;


          if(a[j]==0)


                 j--;


          if(a[i]==0)


         {


                 temp=a[i];


                a[i]=a[j];


                a[j]=temp;


         }


     } 


     for(i=0;i<14;i++)


             Console.Write(a[i]+", ");


}


Output: 1,1,1,1,1,1,0,0,0,0,0,0,0

Report Error

View answer Workspace Report Error Discuss

0 2941
Q:

What do you understand by MapReduce?

Answer

MapReduce is a software framework that was created by Google. It`s prime focus was to aid in distributed computing, specifically large sets of data on a group of many computers. The frameworks took its inspiration from the map and reduce functions from functional programming.

Report Error

View answer Workspace Report Error Discuss

Subject: Cloud Computing

1 2935
Q:

What are storage qualifiers in C++ ?

Answer

ConstKeyword indicates that memory once initialized, should not be altered by a program.
Volatile keyword indicates that the value in the memory location can be altered even though nothing in the program.
Mutable keyword indicates that 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++

0 2935
Q:

What command-line tool would help you discover for which port numbers your computer is listening?

Answer

netstat -n  (on Dos prompt)

Report Error

View answer Workspace Report Error Discuss

1 2933
Q:

Which among the following validators checks if entered data matches a specific format

A) Compare validator B) RegularExpressionValidator
C) CustomValidator D) None
 
Answer & Explanation Answer: B) RegularExpressionValidator

Explanation:

RegularExpressionValidator checks if entered data matches a specific format

Report Error

View Answer Report Error Discuss

Filed Under: .NET
Job Role: Software Architect

0 2931
Q:

What can javascript programs do?

Answer

Generation of HTML pages on-the-fly without accessing the Web server. The user can be given control over the browser like User input validation Simple computations can be performed on the client's machine The user's browser, OS, screen size, etc. can be detected Date and Time Handling

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

0 2931
Q:

What is LINQ ?

Answer

LINQ stands for " Language Integrated Query " and it is pronounced as "LINK".
LINQ was introduced in with .NET framework 3.5 including VS2008. It enables you to query the data from various data source like SQL, XML document, ADO .NET data source, web services and any other objects such as Collection, Generics etc...

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

4 2929
Q:

What is the location of the Active Directory database?

Answer

The Active Directory database is stored on domain controllers and is accessible by network applications. All domains can be domain controllers and keep a copy of the Active Directory database in C:\windows\Ntds\Ntds.dit

Report Error

View answer Workspace Report Error Discuss

6 2929