C Interview Questions
Questions Answers Views Company eMail

How to reverse a linked list

IBM, TCS, Aricent,

1 4818

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 64778

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

7 55547




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

3 6004

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

2 4222

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

Alcatel,

4 24863

implement OR gate without using any bitwise operator.

Wipro, Alcatel,

1 3738

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

Lucent,

2 2823




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 4970

what is difference between C and C++

4 3774

which is faster execution: loops or recursion?

3 3675

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

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

1825

what is computer

4 2536

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?

Wipro, HP,

4 4852


Post New C Questions






Un-Answered Questions { C }

#include #include struct stu { int i; char j; }; union uni { int i; char j; }; void main() { int j,k; clrscr(); struct stu s; j=sizeof(s); printf("%d",j); union uni u; k=sizeof(u); printf("%d",k); getch(); } what is value of j and k.

2491


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

1487


how to find binary of number?

1845


what value is returned to operating system after program execution?

849


write a program to copy the string using switch case?

1658






ATM machine and railway reservation class/object diagram

4068


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

1749


5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.

837


what is bit rate & baud rate? plz give wave forms

787


Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?

840


Write a program to maintain student’s record. Record should not be available to any unauthorized user. There are three (3) categories of users. Each user has its own type. It depends upon user’s type that which kind of operations user can perform. Their types and options are mentioned below: 1. Admin (Search Record [by Reg. No or Name], View All Records, Insert New Record, Modify Existing Record) 2. Super Admin (Search Record [by Reg. No or Name], View All Records, Insert New Record, Modify Existing Record, Delete Single Record) 3. Guest (Search Record [by Reg. No or Name], View All Records) When first time program runs, it asks to create accounts. Each user type has only 1 account (which means that there can be maximum 3 accounts). In account creation, following options are required: Login Name: <6-10 alphabets long, should be unique> Password: <6-10 alphabets long, should not display characters when user type> Confirm Password: Account Type: Login Name, Password and Account Type should be stored in a separate file in encrypted form. (Encryption means that actual information should be changed and Decryption means that Encrypted information is changed back to the actual information) If any of the above mentioned requirement(s) does not meet then point out mistake and ask user to specify information again. When Program is launched with already created accounts, it will ask for user name and password to authenticate. On successful authentication, give options according to the user’s type.

668


what is use of malloc and calloc?

652


Write a C program linear.c that creates a sequence of processes with a given length. By sequence it is meant that each created process has exactly one child. Let's look at some example outputs for the program. Here the entire process sequence consists of process 18181: Sara@dell:~/OSSS$ ./linear 1 Creating process sequence of length 1. 18181 begins the sequence. An example for a sequence of length three: Sara@dell:~/OSSS$ ./linear 3 Creating process sequence of length 3. 18233 begins the sequence. 18234 is child of 18233 18235 is child of 18234 ........ this is coad .... BUt i could not compleate it .....:( #include #include #include #include int main(int argc, char *argv[]) { int N; pid_t pid; int cont; if (argc != 2) { printf("Wrong number of command-line parameters!\n"); return 1; } N = atoi(argv[1]); printf("Creating process sequence of length %d.\n",N); printf("%d begins the sequence.\n",getpid()); /* What I have to do next ?????? */ }

870


How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?

876


Write a progarm to find the length of string using switch case?

847