C Interview Questions
Questions Answers Views Company eMail

Can we use any name in place of argv and argc as command line arguments?

586

What is logical error?

584

If you know then define #pragma?

641

What is the c language function prototype?

617

What is #line?

584

Can main () be called recursively?

607

Do you know what are the properties of union in c?

555

Tell us bitwise shift operators?

572

What is the purpose of 'register' keyword in c language?

594

What is the difference between malloc() and calloc() function in c language?

577

What is memcpy() function?

600

If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?

750

What is a macro in c preprocessor?

600

How to compare array with pointer in c?

595

Tell me when would you use a pointer to a function?

573


Post New C Questions

Un-Answered Questions { C }

where are auto variables stored? What are the characteristics of an auto variable?

561


What is pass by reference in functions?

292


Differentiate between static and dynamic modeling.

592


What is the full form of getch?

551


What is getch() function?

617






What is sizeof array in c?

568


WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?

1835


How can I rethow can I return a sequence of random numbers which dont repeat at all?

685


Explain that why C is procedural?

630


What are logical errors and how does it differ from syntax errors?

629


What is pre-emptive data structure and explain it with example?

3181


Why do some versions of toupper act strangely if given an upper-case letter?

612


A set of N billiard balls are set on a one-dimensional table. The table is 1 meter long, set north-south with two pockets at either side. Each ball has zero width and there is no friction so it is moving with a fixed velocity of either northward or southward and bounces back in a perfect elastic collision from other balls it encounter on its way (or drop into one of the pockets). Your job is to keep track of the balls movements. Task Please write a program that gets the initial place, speed and direction of all the balls and gives the position of a specific ball after t seconds. Input The first line contains the number of scenarios. Each one of the other lines in the input contains a scenario: The first number, N, is the number of balls; followed by N pairs of numbers: the distance in centimeters from the south end of the table and the speed (positive speed meaning it moves northward); the last two numbers are the number i of the target ball you should track and the time T in seconds. Output The output is a single number for each line which is the place (distance in centimeters from the south end of the table) of the tracked ball after T seconds. Note: There is no new line character at the end of the result. Sample Input 5 1 50 1 1 1000 1 50 1 1 6 1 60 -2 1 6 2 10 1 95 -1 2 30 2 10 1 95 -1 2 60 Sample Output 100 56 48 65 70

2110


What do you understand by normalization of pointers?

592


Explain what math functions are available for integers? For floating point?

581