Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

C Interview Questions

What is Bitwise Operator and how it works?

2641

is assignment operator is arithmatic or not

3722

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

1208

void main() { static int i = 5; if(--i) { main(); printf("%d ",i); } } what would be output of the above program and justify your answer? }

19952

enum DAY { sunday, monday, tuesday }; enum EDAYS { friday, saturday, sunday }; void main() { int i =0; if( i == sunday) { printf("%d",i); } } what would be the output?

TCS,

5091

int main() { int x = (2,3,4); int y = 9,10,11; printf("%d %d",x,y); } what would be the output?

8161

WRITE A C PROGRAM FOR PRINT "RHOMBUS" STRUCTURE . Example: Enter the numbers :3 * * * * * * * *

14189

Why can't we initialise member variable of a strucutre

2186

what is bit rate & baud rate? plz give wave forms

1145

what are bps & baud rates? differentiate these two?

TCS,

3112

write a program that eliminates the value of mathematical constant e by using the formula e=1+1/1!+1/2!+1/3!+

2971

write a c program to calculate the income tax of the employees in an organization where the conditions are given as. (I.T. = 0 if income <100000 I.T = 10% if income _< 200000 it = 20% if income >_ 200000)

74738

write a program to create a sparse matrix using dynamic memory allocation.

4008

What are the different types of pointers?

HCL, TCS,

5622

in a town the percentage of men is 52 the percentage of total literacy is 48 if total percentage of literate men is 35 of the total population write a program to find the total no of the literate men and women if the population of the town is 80000

12085

In c language can we compile a program without main() function?

206

why do some people write if(0 == x) instead of if(x == 0)?

231

225

What is hash table in c?

198

What is extern variable in c with example?

176

Explain output of printf("Hello World"-'A'+'B'); ?

571

How can I do graphics in c?

214

How can you read a directory in a C program?

264

What does != Mean in c?

195

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

1759

192

What is a void * in c?

192

How does placing some code lines between the comment symbol help in debugging the code?

190

#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20

678

What is the difference between formatted&unformatted i/o functions?

238