C Interview Questions
Questions Answers Views Company eMail

what is output of the following statetment?Printf(“%x”, -1<<4); ?

5 4898

will the program compile? int i; scanf(“%d”,i); printf(“%d”,i);

3 2170

write a string copy function routine?

2 2448




swap two integer variables without using a third temporary variable?

Persistent,

6 4924

how do you redirect stdout value from a program to a file?

1 1703

write a program that finds the factorial of a number using recursion?

Infosys, TATA,

13 23665

write a “Hello World” program in “c” without using a semicolon?

TCS, Wipro, CTS,

9 7882

Give a method to count the number of ones in a 32 bit number?

4 2241




write a program that print itself even if the source file is deleted?

2 4704

Given an unsigned integer, find if the number is power of 2?

5 4272

what is the difference between these initializations? Char a[]=”string”; Char *p=”literal”; Does *p++ increment p, or what it points to?

4 3806

differentiate between const char *a; char *const a; and char const *a;

TCS, HCL, College School Exams Tests,

2 4629

Why cann't whole array can be passed to function as value.

1 1920

Given a single Linked list with lakhs of nodes and length unknown how do you optimally delete the nth element from the list?

Oracle,

1 2574

What is the relation between # and include

HCL,

5 4664


Post New C Questions






Un-Answered Questions { C }

write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1

1058


string reverse using recursion

1015


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 }

1820


Why we not create function inside function.

874


writ a program to compare using strcmp VIVA and viva with its output.

656






 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

963


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.

158


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

3876


to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?

598


c language interview questions & answer

648


write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.

9915


what is the different bitween abap and abap-hr?

912


Stimulate calculator using Switch-case-default statement for two numbers

1677


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.

689


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures

1961