C Interview Questions
Questions Answers Views Company eMail

WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..

836

#include #include int main() { int a[4][4]={{5,7,5,9}, {4,6,3,1}, {2,9,0,6}}; int *p; int (*q)[4]; p=(int*)a; q=a; printf("\n%u%u",p,q); p++; q++; printf("\n%u%u",p,q); getch(); return 0; } what is the meaning of this program?

2 2266

what is void pointer?

Wipro,

1 2543




1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

1977

void main() { int a=1; while(a++<=1) while(a++<=2); }

HCL,

4 3861

The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this

1 1872

being a chemical engineer and with an aggregate of 80% why you opt for TCS and not your core industry?

TCS,

1 2641

write a program for egyptian fractions in c?

Satyam,

1 5125




How to write the code of the program to swap two numbers with in one statement?

2 3743

write a program to display & create a rational number

TCS, HCL,

1 2631

who developed c and why he developed c?

5 8084

WHO WROTE C LANGUAGE?

4 4860

WHAT IS C?

6 2674

WHAT IS LOW LEVEL LANGUAGE?

2 1822

WHAT IS HIGH LEVEL LANGUAGE?

2 2311


Post New C Questions






Un-Answered Questions { C }

Write a program that accept anumber in words

522


using for loop sum 2 number of any 4 digit number in c language

913


a c code by using memory allocation for add ,multiply of sprase matrixes

1465


write a c program to calculate sum of digits till it reduces to a single digit using recursion

1947


number of times a digit is present in a number

827






Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix

811


hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .

1100


I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.

1028


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.

766


please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics

2124


Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.

779


write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)

869


if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.

3344


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

856


What is the difference between test design and test case design?

840