C Interview Questions
Questions Answers Views Company eMail

What is Heap?

3 4515

Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)

826

how to add numbers without using arithmetic operators.

TCS,

14 7472




if a person is buying coconuts of Rs10,and then sell that coconuts of Rs9,with the loss of one rupee.After that the person became a millaniore.how?

Wipro,

9 5359

a 'c' program to tell that the set of three coordinates lie on a same line

Persistent,

3 10140

write a program to print sum of each row of a 2D array.

4 21198

write a program to arrange the contents of a 1D array in ascending order

4 15148

What will be the output of x++ + ++x?

Religare, MBT,

20 27714




write a Program to dispaly upto 100 prime numbers(without using Arrays,Pointer)

Oracle, TCS, Wipro, Infosys, iFlex, ADITI, Unicops,

26 64083

how is the examination pattern?

Wipro,

832

Find Error if any in below code, Justify ur answer: struct xx { int a; struct yy { char c; struct xx* p; } struct yy* q; }

NDS,

3 4593

main() { int i = 1; int num[] = {1,2,3,4}; num[i] = i++; printf("%d", num[i]); } what will be the output? }

TCS, NDS,

22 16557

#define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i,j,k); } what will the values of i , j and k? }

GATE, CDAC, TCS, NDS,

14 26328

fun(int x) { if(x > 0) fun(x/2); printf("%d", x); } above function is called as: fun(10); what will it print? }

NDS,

17 10228

#define DCHAR char* typedef char* TCHAR; if using these following variables will be declared like DCHAR ch1, ch2; TCHAR ch3, ch4; then what will be types of ch1, ch2, ch3 and ch4?

NDS,

6 5873


Post New C Questions






Un-Answered Questions { C }

how to introdu5ce my self in serco

765


code for replace tabs with equivalent number of blanks

761


pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)

1378


Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.

871


Write the test cases for checking a variable having value in range -10.0 to +10.0?

902






how many errors in c explain deply

839


Why we not create function inside function.

901


Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1

1969


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

9299


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

1911


What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }

937


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

1920


What is the difference between if else and switchstatement

498


Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?

2127


pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)

1081