C Interview Questions
Questions Answers Views Company eMail

How to reverse a linked list

Aricent, Fidelity, IBM, TCS,

1 6047

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 72067

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

7 68711

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

3 7689

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

2 5647

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

Alcatel,

4 30763

implement OR gate without using any bitwise operator.

Alcatel, Wipro,

1 5026

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

Lucent,

2 4498

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 6865

what is difference between C and C++

4 5812

which is faster execution: loops or recursion?

3 5420

#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 6306

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

2573

what is computer

4 4635

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 7166


Post New C Questions

Un-Answered Questions { C }

Difference between macros and inline functions? Can a function be forced as inline?

693


design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.

1483


What are the advantages and disadvantages of pointers?

563


How can you determine the size of an allocated portion of memory?

732


Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.

1753






What are control structures? What are the different types?

584


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

1611


What is the role of this pointer?

538


explain how do you use macro?

655


Why enum is used in c?

513


What is c language and why we use it?

606


how to capitalise first letter of each word in a given string?

1417


What does d mean?

570


How can I check whether a file exists? I want to warn the user if a requested input file is missing.

647


Can a variable be both static and volatile in c?

594