C Interview Questions
Questions Answers Views Company eMail

What is floating point exception error? And what are different types of errors occur during compile time and run time? why they occur?

1 1951

Write a program to remove the C comments(/* */) and C++ comments(//) from a file. The file should be declared in command line.

Persistent, Subex,

4 45125

write a addition of two no. program with out using printf,scanf,puts .

4 8775




what is differnence b/w macro & functions

1 2223

Can u return two values using return keyword? If yes, how? If no, why?

7 4985

program to find the ASCII value of a number

8 16071

please send me papers for Dy. manager IT , PNB. it would be a great help for me.

1030

#define d 10+10 main() { printf("%d",d*d); }

6 8438




What is meaning of tree

790

to find the program of matrix multiplication using arrays

Bhel,

6 16197

WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER

775

write a programe returns the number of times the character appears in the string

2 2406

Write a program that takes three variables(a,b,c) in as separate parameters and rotates the values stored so that value a goes to b,b,to c and c to a

7 12782

1. Duplicate the even numbers. -1 Sample I/O Array1:- 4,2,24,3,22 Updated Array:- 4,4,2,2,24,24,3,22,22 2. Reverse the array in a region - 1 Sample I/O Array1:- 4,2,24,3,22,41,21 Enter Region:- 2,5 Update Array:-4,41,22,3,24,2,21 3. Store first the even digits in an array and then odd digits in same array -2 Sample I/O Array1:- 4,2,24,3,22,41,21 Array 2:- 4,2,2,4,2,2,4,2,3,1,1 4. Store the count of the digits in all numbers in an array and print the count. -2 Sample I/O Array1:- 4,2,9,3,7,41,28 Array 2:- 0,1,1,1,2,0,0,1,1,1 1-1;2-1;3-1;4-2;7-1;8-1;9-1 5. Store all palindrome numbers in to another array -2 Sample I/O Array1:- 4,22,9,313,7,141,28 Array 2:- 4,22,9,313,141 6. Arrange the array in such a way that odd numbers come first and then even numbers -1 Sample I/O Array1:- 4,22,9,313,7,141,28 Update Array1:- 9,313,7,141,4,22,28 7. Store into another array by inserting it in the right place - 2 Sample I/O Array1:- 4,22,9,313,7,141,28 Array2:- 4 /4,22 /4,9,22 /4,9,22 ,313 /4,7,9,22 ,313 /4,7,9,22 ,141,313 / 4,7,9,22,28 ,141,313 8. Merge two sorted arrays in a sorted fashion - 3 Sample I/O Array 1:- 3,6,7,9,11,16 Array 2:- 1,2,5,7,20 Array 3:- 1,2,3,5,6,7,9,11,16,20 9. Upadte the array so that an array element is followed by its revere - 1 Sample I/O Array 1:- 13,63,74,9,11,16 Updated Array 1:- 13,31,63,36,74,47,9,9,11,11,16,16 10.Spread the digits of the array in the same array. -1 Sample I/O Array 1:- 13,63,74,9,11,16 Updated Array 1:-1,3,6,3,74,9,1,1,1,6 11.Shift the boundary of array to have only 2 digit numbers. Sample I/O Array 1:- 139,643,74,9,101,126 Updated Array 1:- 13,96,43,74,91,11,26 12.Print the largest occuring digit in an array of N numbers. Sample I/O Array 1:- 13,63,74,9,11,16 1 occurs most.

Intel,

2 2122

Read N characters in to an array . Use functions to do all problems and pass the address of array to function. 1. Print only the alphabets . If in upper case print in lower case vice versa.

1 2195


Post New C Questions






Un-Answered Questions { C }

write a program to generate address labels using structures?

1497


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

990


Which is the memory area not included in C program? give the reason

791


Give basis knowledge of web designing ...

850


I need help with the following lab. Can anyone explain it to me on how to approach this problem. Coding would be great too !!! No busy waiting allowed. Remember that Java monitors are 'signal and continue'. The input data is called the database (DB). In this problem, it consists of a single variable initialized in the main thread, to contain the current time of day in HH:MM:SS:mmm format (mmm is milliseconds) truncated to 3 digits. Threads follow these rules: 1. Readers may all attempt to read at the same time, but NOT if a writer is writing (i.e.; the writer is in the monitor. 2. Writing is exclusive (only 1 writer at a time, no readers while writing). 3. Options: (to be specified by instructor) a. Readers have absolute priority over writers. b. Writers have absolute priority over readers c. When a reader arrives and a writer is waiting, the reader is suspended behind the writer instead of being admitted immediately. Thus, a writer waits for readers that were running when it arrived, but does not to wait for new readers. You may program this in C++ or Java. There are 4 controlling input values: 1. r – number of readers 2. w – number of writers 3. R – delay for a reader to restart 4. W – delay for a writer to restart Create the following program consisting of 1 main process (your main program) with n threads: 1. The main thread: a. Creates the 'n' threads needed. Of these, r of them are readers and w of them are writers. Starts all readers and writers. b. Waits for all 'n' threads to complete. You may use any method to detect when they are all complete. c. Prints out the resulting outputs from the threads. 2. Threads: a. When a thread starts to run, it immediately tries to enter the monitor. b. A reader thread reads the DB, outputs the exact message below, then exits: >>> DB value read =: HH:MM:SS:mmm by reader number: rr where the underlined text is replaced with actual data. c. A writer thread updates the DB with a new value (from the system time), outputs the exact message below, then exits: *** DB value set to: HH:MM:SS:mmm by writer number: ww where the underlined text is replaced with actual data. d. Each thread accesses the data a total of 10 times, exiting, then re-entering the monitor after each access. Hints: 1. File access *might* not be thread-safe, so you should be prepared to handle this. Read the documentation for the language you are using. 2. Suggested values for delays are: a. If looping, R >=1,000,000 and W>=100,000 b. If using “sleep”, then R=100 ms, W=50 ms. Additional: • Thread output is to ONE file used by ALL threads (so you need to synchronize access to it). • Readers must provide sufficient delay that results are useful (delay by R before re-trying). R is another input value. • Writers must also delay. Delay by W, updating the DB each time. W is an input. • Test your program with AT LEAST TWO different sets of values for r and w (#s of readers and writers) plus this set: r = 4, w=2. Basic operation of a thread: attempt to enter the monitor. If unsuccessful, you get put on a queue. When you get in, read or write the data (depending on type of thread), exit the monitor, wait the required delay amount, then try again. Repeat 10 times.

746






what will be maximum number of comparisons when number of elements are given?

683


write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a

694


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

1953


Write a C program to count the number of email on text

767


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)

891


Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings

1513


write a program to concatenation the string using switch case?

830


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

833


why we wont use '&' sing in aceesing the string using scanf

1043


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

1506