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

Credit sales are recorded as

A) Accounts Receivable B) Accounts Payable
C) Both A & B D) None of the above
 
Answer & Explanation Answer: A) Accounts Receivable

Explanation:
Report Error

View Answer Report Error Discuss

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

1 2201
Q:

What CICS command are used to read a VSAM KSDS sequentially in ascending order?

Answer

READNEXT reads the next record from a browse operation for any of the three VSAM files.

Report Error

View answer Workspace Report Error Discuss

0 2201
Q:

What are standard query operators in LINQ?

Answer

The standard query operators in LINQ are the extension methods that form the LINQ pattern. These operators form an API that enables querying of any .NET array or collection. It operates on sequences and allows you to perform operations, such as determining if a value exists in the sequence and performing an aggregated function, such as a summation over a sequence.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 2201
Q:

Assets minus liabilities equals

A) Equity B) Net income
C) Working capital D) Net assets
 
Answer & Explanation Answer: A) Equity

Explanation:

Assets minus liabilities equals Equity.

assets_minus_liabilities_equals1556624662.png image

Report Error

View Answer Report Error Discuss

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

1 2198
Q:

What is Aggregate Functions?

Answer

Aggregate functions perform a calculation on a set of values and return a single value. Aggregate functions ignore NULL values except COUNT function. HAVING clause is used, along with GROUP BY, for filtering query using aggregate values.


Following functions are aggregate functions. 


AVG, MIN CHECKSUM_AGG, SUM, COUNT, STDEV, COUNT_BIG, STDEVP, GROUPING, VAR, MAX. VARP

Report Error

View answer Workspace Report Error Discuss

Subject: SQL

0 2197
Q:

Automatic stabilizers refer to

A) government spending and taxes that automatically increase or decrease along with the business cycle. B) changes in the money supply and interest rates that are intended to achieve macroeconomic policy objectives.
C) changes in federal taxes and purchases that are intended to achieve macroeconomic policy objectives. D) the money supply and interest rates that automatically increase or decrease along with the business cycle.
 
Answer & Explanation Answer: A) government spending and taxes that automatically increase or decrease along with the business cycle.

Explanation:
Report Error

View Answer Report Error Discuss

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

0 2196
Q:

Client code having direct access to internal data is called

A) Encapsulation B) DataHiding
C) Polymorphism D) DataAbstraction
 
Answer & Explanation Answer: B) DataHiding

Explanation:

Client code must use setters and getters to access internal data in DataHiding

Report Error

View Answer Report Error Discuss

Filed Under: Java

0 2196