C Interview Questions
Questions Answers Views Company eMail

ATM machine and railway reservation class/object diagram

Zycus Infotech,

4069

if array a conatins 'n' elements and array b conatins 'n-1' elements.array b has all element which are present in array a but one element is missing in array b. find that element.

Zycus Infotech, Ram Infotech, Parexel,

18 14486

Why is conio.h not required when we save a file as .c and use clrscr() or getch() ?

2 3129




what is the difference between entry control and exit control statement?

Darbari Lal DAV Model School,

12 64363

How to add two numbers with using function?

Miracle Solutions,

2 2438

How to add two numbers with using function?

4 11939

array contains zeros and ones as elements.we need to bring zeros one side and one other side in single parse. ex:a[]={0,0,1,0,1,1,0,0} o/p={0,0,0,0,0,1,1,1}

Google, Motorola,

12 8710

how to print a statement in c without use of console statement ,with the help of if statement it should print

Satyam,

2 2753




main is a predefined or user define function if user defined why? if predefined whay?

TCS,

12 21996

what is a c-language.what is do.

HCL,

4 5046

how to find out the union of two character arrays?

2 3960

what is pointer ?

Kernex Micro Systems,

10 4941

totally how much header files r in c language

TCS,

8 5797

Every time i run a c-code in editor, getting some runtime error and editor is disposing, even after reinstalling the software what may be the problem?

2 2013

Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me

744


Post New C Questions






Un-Answered Questions { C }

how to print the character with maximum occurence and print that number of occurence too in a string given ?

1284


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


`write a program to display the recomended action depends on a color of trafic light using nested if statments

885


disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit

830


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.

3312






Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me

744


Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc

3011


what is the diffrenet bettwen HTTP and internet protocol

683


i want to know the procedure of qualcomm for getting a job through offcampus

1226


How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?

876


ATM machine and railway reservation class/object diagram

4069


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

607


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.

1309


difference between object file and executable file

4277


How to delete a node from linked list w/o using collectons?

1373