C Interview Questions
Questions Answers Views Company eMail

count the numbers between 100 and 300, that star with 2 and ends with 2

Mind Tree,

5 13587

wat is the difference between array and pointer?

Wipro,

4 4880

how to go with this?

Wipro,

1 2631

what is the need for main function in c?

5 6374

main() { float f1=10.5; double db1=10.5 if(f1==db1) printf("a"); else printf("b") }

CSC,

2 5399

main() { static int ivar=5; printf("%d",ivar--); if(ivar) main(); }

CSC,

3 10614

Program to find largest of three numbers without using comparsion operator?

3 4282

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

errors in computer programmes are called

NET,

1 3069

How can I find leaf node with smallest level in a binary tree?

1 2864

why we are using semicolon at the end of printh statment

HCL,

2 4390

how many errors in c explain deply

1610

64/square(4)

1 3823

write a programming in c language, 1 3 5 7 9 11

NIIT,

2 4767

nic scientist exam

NIC,

1 3981


Post New C Questions

Un-Answered Questions { C }

You have given 2 array. You need to find whether they will create the same BST or not. For example: Array1:10 5 20 15 30 Array2:10 20 15 30 5 Result: True Array1:10 5 20 15 30 Array2:10 15 20 30 5 Result: False One Approach is Pretty Clear by creating BST O(nlogn) then checking two tree for identical O(N) overall O(nlogn) ..we need there exist O(N) Time & O(1) Space also without extra space .Algorithm ?? DevoCoder guest Posted 3 months ago # #define true 1 #define false 0 int check(int a1[],int a2[],int n1,int n2) { int i; //n1 size of array a1[] and n2 size of a2[] if(n1!=n2) return false; //n1 and n2 must be same for(i=0;ia1[i+1]) && (a2[i]>a2[i+1]) ) ) return false; } return true;//assumed that each array doesn't contain duplicate elements in themshelves }

2684


What is wrong with this initialization?

564


i have a written test for microland please give me test pattern

2149


When should I declare a function?

599


FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above

590






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

1437


What does do in c?

584


Explain the advantages of using macro in c language?

548


The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.

1034


What is a volatile keyword in c?

615


What is keyword with example?

614


Are global variables static in c?

647


There seem to be a few missing operators ..

589


if p is a string contained in a string?

1384


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

1898