Posts

Showing posts from March, 2017

Programming Interview Question

Question: What the below func would return? int Add()         {             int z = 0;             try             {                 int x = 3;                 int y = 5;                 z = x + y;                 return z;             }             finally             {      ...

Programming Interview Question

Program to print sum of given string where a=0, b=1, c= a+b, d= b+c, e= c+d ….  z= x+y Example: Input:     a=0 b=1                String “Question” Output:  Sum of Given string : 15151       int a, b;             string strString = "abcdefghijklmnopqrstuvwxyz" ;             int sum = 0;             int indx;             string strEntered;             a = int .Parse( Console .ReadLine());             b = int .Parse( Console .ReadLine());             strEnte...

Programming Interview Question

Q1. Write a program to remove repeated word from string.(don't take extra memory). Example: Input- " hello hi is hello this"; Output - "hello hi is this" Q2. arr1 {1,3,4,5,8}     arr2 {2,6,7,9,11}     arr3 {10,12,13,14} Find the middle point after merging these array...if there are two middle point find both. (Don’t take extra space). Q3. Print array like.. 1 2 3 4 5 2 1 2 3 4 3 2 1 2 3 4 3 2 1 2 5 4 3 2 1