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 1353

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.

613

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

TCS, Vector,

8 13070




c language interview questions & answer

680

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

1 1475

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

CMC,

5 3665

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

Google,

3 1730

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

MNC,

2125




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

Google,

933

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

Google,

1 2229

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

Google,

2 1581

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

Google,

1 1860

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

Google,

1 1785

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++;

Google,

2 1944

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

2 2616


Post New C Questions






Un-Answered Questions { C }

please send me the code for multiplying sparse matrix using c

978


write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

765


How do we make a global variable accessible across files? Explain the extern keyword?

653


code for quick sort?

777


what is ur strangth & weekness

1011






How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

12666


using for loop sum 2 number of any 4 digit number in c language

841


If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.

1026


‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

1429


 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

981


largest Of three Number using without if condition?

9


#define MAX 3 main() { printf("MAX = %d ",MAX ); #undef MAX #ifdef MAX printf("Vector Institute”); #endif }

1742


what will be the output for the following main() { printf("hi" "hello"); }

5128


a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f

789


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

652