C Interview Questions
Questions Answers Views Company eMail

How to reverse a linked list

Aricent, Fidelity, IBM, TCS,

1 6355

1. Write a C program to count the number of occurrence of a specific word in the given strings. (for e.g. Find how many times the word “live” comes in the sentence “Dream as if you’ll live forever, live as if you’ll die today ”)

Eskom, TCS,

12 74136

write a c program to store and print name,address,roll.no of a student using structures?

7 70245

Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates

3 8389

Reverse the bit order in a single macro. eg. i/p = 10010101 --> o/p = 10101001

2 6096

implement NAND gate logic in C code without using any bitwise operatior.

Alcatel,

4 31822

implement OR gate without using any bitwise operator.

Alcatel, Wipro,

1 5426

Is the below things valid & where it will be stored in memory layout ? static const volatile int i; register struct { } ; static register;

Lucent,

2 5000

in one file global variable int i; is declared as static. In another file it is extern int i=100; Is this valid ?

Infosys, NetApp,

4 7638

what is difference between C and C++

4 6661

which is faster execution: loops or recursion?

3 6206

#include #include void main() {clrscr(); char another='y'; int num; for(;another=='y';) { printf("Enter a number"); scanf("%d",&num); printf("squre of %d is %d",num,num*num); printf("\nwant to enter another number y/n"); scanf("%c",&another); } getch(); } the above code runs only one time.on entering 'y' the screen disappeares.what can i do?

3 7076

Simplify the program segment if X = B then C ← true else C ← false

2813

what is computer

4 5419

we compile c program in 32 processor and 64 bit processor .exe file is created in both the processors. if we want to run .exe file in 64 bit processor which is created in 32 bit processor. is that .exe file is run or not if it is not run why?

HP, Wipro,

4 7828


Post New C Questions

Un-Answered Questions { C }

Why clrscr is used in c?

797


What is getch?

852


What are the functions to open and close file in c language?

963


What is declaration and definition in c?

771


How can I generate floating-point random numbers?

812


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

885


What is openmp in c?

794


What is a program flowchart and how does it help in writing a program?

917


What is meant by high-order and low-order bytes?

856


Can we declare function inside main?

770


What is the time and space complexities of merge sort and when is it preferred over quick sort?

887


How can I write a function that takes a format string and a variable number of arguments?

844


Explain pointers in c programming?

880


State the difference between realloc and free.

849


What is the use of #define preprocessor in c?

842