C Interview Questions
Questions Answers Views Company eMail

what is the difference between. system call and library function?

Satyam, CDAC,

2 16709

struct ptr { int a; char b; int *p; }abc; what is d sizeof structure without using "sizeof" operator??


9 9276

what is diff b/w huge & far & near pointer??


1 2439

write a function for strtok()??


2 7724

what is the output of the following program and explain the answer #include exp() { main(5) } main(int a) { printf("%d",a); return; }


3 3370

what is difference b/w extern & volatile variable??


6 9449

what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?

Satyam, Gamesa,


design and implement a program that reads floating-points numbers in a sentinel-controlled loop until the user terminates the program by entering zero.your program should determinate and print the smallest,largest and average of the supplied numbers.

2 3524

i want to have a program to read a string and print the frequency of each character and it should work in turbo c

Wipro, Persistent,

3 6259

here is a link to download Let_Us_C_-_Yashwant_Kanetkar


3 7840

How do you write a program which produces its own source code as its output?

2 3198

what is the importance of spanning tree?


How to reverse a string using a recursive function, with swapping?

5 4788

How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST

Adobe, Huawei,

6 7182

what is pointer


1 2591

Post New C Questions

Un-Answered Questions { C }

Write the test cases for checking a variable having value in range -10.0 to +10.0?


what is the syallabus of computer science students in group- 1?


will u please send me the placement papers to my mail???????????????????


can any one tel me wt is the question pattern for NIC exam


what is reason of your company position's in india no. 1.


Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop


Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80


process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,


number of times a digit is present in a number


please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.


Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)


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.


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;


write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...