Interview Questions

Q:

Write a method to fill all the spaces in a string with '%20'

Answer

public class Test {


    public void replaseSpaces(char[] str, int length) {


        int spaceCount = 0, newLength = 0, i = 0;


        for(i = 0; i < length; i++) {


            if (str[i] == ' ') 


                spaceCount++;


        }


 


        newLength = length + (spaceCount * 2);


        str[newLength] = '\0';


        for(i = length - 1; i >= 0; i--) {


            if (str[i] == ' ') {


                str[newLength - 1] = '0';


                str[newLength - 2] = '2';


                str[newLength - 3] = '%';


                newLength = newLength - 3;


            }


            else {


                str[newLength - 1] = str[i];


                newLength = newLength - 1;


            }


        }


        System.out.println(str);


    }


 


    public static void main(String[] args) {


        Test tst = new Test();


        char[] ch = {'t', 'h', 'e', ' ', 'd', 'o', 'g', ' ', ' ', ' ', ' ', ' ', ' '};


        int length = 6;


        tst.replaseSpaces(ch, length);  


    }


}

Report Error

View answer Workspace Report Error Discuss

0 2428
Q:

Comprehensive income includes all of the following except

A) expenses B) contributions by owners
C) extraordinary items D) losses
 
Answer & Explanation Answer: B) contributions by owners

Explanation:

Comprehensive income is the sum of net income and other items that must bypass the income statement because they have not been realized, including items like an unrealized holding gain or loss from available for sale securities and foreign currency translation gains or losses.

Report Error

View Answer Report Error Discuss

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

0 2426
Q:

What is the argument of main() method?

Answer main() method accepts an array of String object as arguement.
Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 2426
Q:

The model for a record management system might be

A) a rolodex card file B) a business form
C) handwritten list D) All of the above
 
Answer & Explanation Answer: D) All of the above

Explanation:

A Records Management System is a computer program or set of programs used to manage and store records.

 

For example, a hospital record for storing new room, ward , patients, etc...

The_model_for_a_record_management_system_might_be1553926899.png image

Report Error

View Answer Report Error Discuss

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

0 2418
Q:

What are the steps you go through while creating a COBOL program executable?

Answer

DB2 precompiler (if embedded sql used), CICS translator (if CICS program), COBOL compiler, Link editor. If DB2 program, create plan by binding the DBRMs.

Report Error

View answer Workspace Report Error Discuss

0 2418
Q:

What is Data Integration?

Answer

- The process of combining data from different resources.


- The combined data is provided to the users with unified view.


- Information from different enterprise domains are integrated – known as Enterprise Information Integration.


- Useful for merging information from different technologies among enterprises.


- The sub areas of data integration are 


1. Data Warehousing.


2. Data Migration.


3. Master Data Management.

Report Error

View answer Workspace Report Error Discuss

0 2416
Q:

Define authentication and authorization.

Answer

Authorization: The process of granting access privileges to resources or tasks within an


application.


Authentication: The process of validating the identity of a user.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET
Job Role: Software Architect

0 2415
Q:

What is AWB?. What is its purpose?

Answer

AWB stands for Administrator WorkBench. AWB is a tool for controlling, monitoring and maintaining all the processes connected with data staging and processing in the business information whearhousing.

Report Error

View answer Workspace Report Error Discuss

Subject: SAP

0 2414