C Interview Questions
Questions Answers Views Company eMail

write a program in c to find out the sum of digits of a number.but here is a condition that compiler sums the value from left to right....not right to left..

1 1281

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.


main() { int i = 10; printf(" %d %d %d \n", ++i, i++, ++i); }


8 11504

c language interview questions & answer


What is the difference between realloc() and free()

1 1405

int a=20; int b=30; int c=40; printf("%d%d%d"); what will be the output?


5 3460

input any 4 digit number and find the difference of all the digits?


3 1637

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



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); } }



what is the purpose of the following code, and is there any problem with the code? void fn(long* p1, long* p2) { register int x = *p1; register int y = *p2; x ^= y; y ^= x; x ^= y; *p1 = x; *p2 = y; }


1 2118

what is the purpose of the code, and is there any problem with the code? int f( int n, int l, int r ) { return (n << l) >> r; }


2 1521

What is the purpose of the code, and is there any problem with it? unsigned int f( unsigned n ) { return –n & 7; }


1 1791

what is the purpose of the code, and is there any problem with it. bool f( uint n ) { return (n & (n-1)) == 0; }


1 1705

what is the purpose of the code, and is there any problem with it. unsigned int v[10]; unsigned int i = 0; while (i < 10) v[i] = i++;


2 1850

Identify the operators that is not used with pointer a. && b. # c. * d. >>

2 2283

Post New C Questions

Un-Answered Questions { C }

write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);


what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?


Can you write the algorithm for Queue?


code for quick sort?


how logic is used


process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,


Wt are the Buses in C Language


void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }


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


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....


code for replace tabs with equivalent number of blanks


Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80


Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.


Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)


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