C Interview Questions

what is uses of .net

484

Write a program that accept anumber in words

466

7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.

1221

Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

553

4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.

TCS,

813

when to use : in c program?

1022

write a program to generate address labels using structures?

SJC,

1418

5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.

792

#include void main() { int =1; printf("%d%d%d",a++,++a,++a); }

VB,

1652

sum of two integers values only other then integer it should print invalid input.

752

c program to input values in a table(using 2D array) and print odd numbers from them

775

Why array starts with index 0

1019

What is Conio.h ?

TCS,

1387

using only #include and #include Write a program in C that will read an input from the user and print it back to the user if it is a palindrome. The string ends when it encounters a whitespace. The input string is at most 30 characters. Assume the string has no spaces and distinguish between and lowercase. So madam is a palindrome, but MadAm is not a palindrome. Use scanf and %s to read the string. Sample Test: Enter a string: madam madam is a palindrome. Enter a string: 09023 09023 is not a palindrome.

436

write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1

1136

Technical Ability Test: This was difficult. three questions to be attempted in 60 min. The Coplete Technical Paper was as follows: Write the Pseudo code for the following: 1. Wrie a function which returns the most frequent number in a list of integers. Handle the case of more than one number which meets this criterion. public static int[] GetFrequency(int[] list) 2. Counting in Lojban, an artificial language developed over the last fourty years, is easier than in most languages The numbers from zero to nine are: 0 no 1 pa 2 re 3 ci 4 vo 5 mk 6 xa 7 ze 8 bi 9 so Larger numbers are created by gluing the digit togather. For Examle 123 is pareci Write a program that reads in a lojban string(representing a no less than or equal to 1,000,000) and output it in numbers. 3. Where now stands that small knot of villages known as the Endians, a mighty forest once stood. Indeed, legand has it that you could have stoodon the edge of the wood and seen it stretch out for miles, were it not for the trees getting in the way. In one section of the forest, the trees stood in a row and were of hight from 1 to n, each hight occurring once and once only. A tree was only visible if there were no higher trees before it in the row. For example, if the heights were 324165, the only visible trees would have been those of height 3,4 & 6. Write a Program that takes an array of integers representing the heights of the trees in the row as input and prints the list of the visible trees. //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// ////////////////// Ques1: Given an array containing k nos in the range 1..n and another scratch array of size n. Write an program to remove the duplicates from the array. Ques2: Given a table of the form: Product Sold on A 1/1/1980 B 1/1/1980 C 1/1/1980 A 1/1/1980 B 1/1/1980 C 2/1/1980 A 2/1/1980 There are 30 products and 10,000 records of such type. Also the month period during which sales happened is given to u. Write the program to display the result as: Product Month No. of copies A January 12 A February 15 A March 27 B January 54 B February 15 B March 10 C January 37 Ques3: Definition of priority queue was given. We have to implement the priority queue using array of pointers with the priorities given in the range 1..n. The array could be accessed using the variable top. The list corresponding to the array elements contains the items having the priority as the array index. Adding an item would require changing the value of top if it has higher priority than top. Extracting an item would require deleting the first element from the corresponding queue. The following class was given: Ques4: An array of size 5X5 is given to us. The elements from 1 to 25 are to be inserted in the array, such that starting from a particular position for an element i, the next element i+1can be inserted only at the mentioned positions (u,v), and if these all positions are occupied then it returns giving a count of how many positions have been occupied in the array: //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// ////////////////// Example: if the starting element is 1 with the given positions (1,2), then next element 2 can be placed at any one of the positions marked with *. _ _ _ _ _ 1 _ _ _ * _ _ _ _ _ _ _ * _ _ * _ _ _ _ 2. Four questions of programming in c++, questions were:( 1:30 hr) a) Bubble sort through recursion b) Display Pattern: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 … c) Perform the functionality of 2-D array through 1-D array and in it the functions to be performed were: (1) Display the array in 2-D format (2) Display a particular element (3) Display a particular row (4) Display a particular column d) Give an efficient program for string matching like: Text: this is the code in the text which you have to search by code Pattern: Code Count the no. of occurrences of the pattern to be searched //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// ////////////////// a) suppose u r given a 4*3 rectangle like (take these values from user) Now u have to calculate the no. of squares in this rectangle like: No. of squares of dimension 1 is 12 No. of squares of dimension 2 is 6 No. of squares of dimension 3 is 2 No. of squares of dimension 4 is 0 Total no. of squares are 20. b) Suppose u r given a string. U have to find the occurance of the characters A-Z in that string. Each character must appear in the string and must appear only once. If It that occurs in string more than one time return 1 showing it is a perfect string otherwise return 0 showing it is not a perfect string. c) Suppose u r given 10000 marks. U have to pick up top 20 top marks from them and display it on the screen. (Use the optimal sorting algorithm) d) Suppose u have a chess board. U have to insert 8 queens on the chessboard in the style that the queens don’t intersect in the diagonals, columns and rows. If they intersect return 1 else return 0.(that is no more than one queen should be present either in row or column or diagonals.) If the queen is inserted at a position in the chessboard, its count is 1.

2521

write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3

860

c program to compute AREA under integral

932

Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250

694

can any one provide me the notes of data structure for ignou cs-62 paper

943

When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.

686

1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if

3209

what are non standard function in c

630

program to convert a integer to string in c language'

1061

why wipro wase

1028

using only #include and #include Write a program in C that will read an input from the user and print it back to the user if it is a palindrome. The string ends when it encounters a whitespace. The input string is at most 30 characters. Assume the string has no spaces and distinguish between and lowercase. So madam is a palindrome, but MadAm is not a palindrome. Use scanf and %s to read the string. Sample Test: Enter a string: madam madam is a palindrome. Enter a string: 09023 09023 is not a palindrome.

436

int i=10; printf("%d %d %d", i, i=20, i);

21

hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

845

write a program to print largest number of each row of a 2D array

1098

what is bit rate & baud rate? plz give wave forms

736