C Interview Questions
Questions Answers Views Company eMail

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 “****”.


Question 1: You want to conduct a survey within your classroom, on the quality of canteen’s food. You ask each of your class fellows to rank the quality of food between 1 and 5 (1 representing excellent quality and 5 representing worst quality). During the survey, you make a list containing the roll# of student and the opinion given by that student. The list can be as follow Roll # Opinion 234 1 235 1 236 5 237 1 238 2 239 3 240 5 241 5 242 1 To get the results of the survey, you need to determine the frequency of each opinion value. The frequency of an opinion is determined by counting the number of students giving that opinion. For example, for the above list the frequency of opinion value 1 is 4 and frequency of opinion value 4 is 0. After getting the frequency of each opinion, you can easily judge about the quality of the food by seeing through the frequency of each opinion. You need to develop a program to calculate the results of this survey. The program inputs the opinion of 50 students and counts the frequency of each opinion. It then displays a report showing the frequency of each opinion. Sample output: Opinion Frequency Remarks 1 5 Excellent 2 10 Good 3 15 Normal 4 10 Bad 5 10 Really bad

1 1975

write a c program to calculate sum of digits till it reduces to a single digit using recursion



how to build a exercise findig min number of e heap with list imlemented?


. A database table called PERSON contains the fields NAME, BASIC and HRA. Write a computer program to print a report which employee name and total salary for those employees whose total salary is more than 10,000. Total Salary = BASIC + HRA. At the end, the program should also print the total number of employees whose total salary is more than 10,000.

1 4154

Write a c program to print the even numbers followed by odd numbers in an array without using additional array

Tech Mahindra,

1 1622

Just came across this question, felt worth sharing, so here it is I want you to make a C/C++ program that for any positive integer n will print all the positive integers from 1 up to it and then back again! Let's say n=5 I want the program to print: 1 2 3 4 5 4 3 2 1. Too easy you say? Okay then... You can ONLY USE: 1 for loop 1 printf/cout statement 2 integers( i and n) and as many operations you want. NO if statements, NO ternary operators, NO tables, NO pointers, NO functions!

1 1690

write a program in c to read array check element is present or not?

1 2179

How to write a program to receive an integer & find its octal equivalent by using for loop?


1 2187

main() { int x, arr[8]={11,22,33,44,55,66,77,88}; x=(arr+2)[3]; printf(“%d”,x); }


3 5476

struct tag{ auto int x; static int y; };main() { struct tag s; s.x=4; s.y=5; printf(“%d”,s.x); }


2 4535

main() { struct test { char c; int i; char m; } t1; printf("%d %d\n", sizeof(t1), sizeof(t1.c)); }

Vector, Vector India,

1 4365

main() { unsigned int k = 987 , i = 0; char trans[10]; do { trans[i++] =(char) (k%16 > 9 ? k%16 - 10 + 'a' : '\0' ); } while(k /= 16); printf("%s\n", trans); }


3 4052

main() { FILE *fs; char c[10]; fs = fopen(“source.txt”, ”r”); /* source.txt exists and contains “Vector Institute” */ fseek(fs,0,SEEK_END); fseek(fs,-3L,SEEK_CUR); fgets(c,5,fs); puts(c); }


1 2650

main() { char as[] = "\\0\0"; int i = 0; do{ switch( as[i++]) {case '\\' : printf("A"); break; case 0 : printf("B"); break; default : printf("C"); break; }} while(i<3); }


2 1782

Post New C Questions

Un-Answered Questions { C }

What is the code for 3 questions and answer check in VisualBasic.Net?


write a program to display all prime numbers


please give me some tips for the placement in the TCS.


write a progrmm in c language take user interface generate table using for loop?


string reverse using recursion


how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?


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 ?????? */ }


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


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?


What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.


Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.




how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?


how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.