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 2626
Q:

What is PEAR in php?

Answer

PEAR(PHP Extension and Application Repository) is a framework and repository for reusable PHP components. PEAR is a code repository containing all kinds of php code snippets and libraries. 


PEAR also offers a command-line interface that can be used to automatically install "packages".

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 2624
Q:

When finally block is executed?

Answer

If exception is generated  in try and if that exception is not catch by any catch then finally is executed.


If exception is generated in try and if that exception is caught by one of catch statements then also finally is executed.


if no exception is generated then also finally is executed.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 2620
Q:

Explain how to send large amounts of emails with php.

Answer

The mail() function of PHP is quite robust for sending bulk emails. A SMTP server can also be directly used from the script. PHPmailer class can be used for sending emails.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 2618
Q:

Which platforms does Silverlight support?

Answer

  • Mac OS 

  • Windows Vista 

  • Windows XP SP2 

  • Windows 2000 

  • Windows Server 2003 

  • Linux (Moonlight) 



 

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

0 2616
Q:

Are Java and JavaScript the Same?

Answer

No.java and javascript are two different languages.
Java is a powerful object - oriented programming language like C++,C whereas Javascript is a client-side scripting language with some limitations.

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

0 2613
Q:

What's fuzz testing ?

Answer

1) List down usecases (taken from business cases) from function specs. For each use case write a test case and categorize them into sanity tests, functionality, GUI, performance etc. Then for each test case, write its workflow. 


2) For a GUI application - make a list of all GUI controls. For each control start writing test cases for testing of the control UI, functionality (impact on the whole application), negative testing (for incorrect inputs), performance etc.  

Report Error

View answer Workspace Report Error Discuss

Subject: QA Testing

0 2608
Q:

What is Cascade and Drill Through? What is the difference between them?

Answer

Cascade:


- Cascade process involves taking values from various other prompts.


- The result is a single report.


- The result is used when a criteria is to be implemented.


 


Drill Through:


- Drill Through process is implemented when navigation from summary to detailed information.


- Drill Through has a parent and a child report.


- Data of another report can be seen based on the current details of data.

Report Error

View answer Workspace Report Error Discuss

0 2608