C Interview Questions
Questions Answers Views Company eMail

can any one tell that i have a variable which is declared as static but i want this variable to be visible to the other files? how?

2 2286

what is diffrence between string and character array?

1 2346

GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA

633




i want to asked a question about c program the question is: create a c program that displays all prime numbers less than 500? using looping statement

5 3866

what is the value of b if a=5; b=++a + ++a

TCS, Infosys, Tech Mahindra,

28 16709

Write a c program to find, no of occurance of a given word in a file. The word is case sensitive.

2 5825

create a C program that displays one z,two y's,three x's until twenty six A's. plzz answer i need it tomorrow.

4 2415

what will be the output for the following program? main() { char ch = 'k'; char c; printf("%c",c); }

3 2867




union { char ch[10]; short s; }test; test.s = 0xabcd; main() { printf("%d",ch[10]); }

3 2622

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

2 3223

Write a program to display the no of bit difference between any 2 given numbers eg: Num1 will 12->1100 Num2 will 7->0111 the difference in bits are 2.

4 2611

A.C func() { pritnf(" in fuction %d",MACRO); } MAIN.c testfunc() { #define MACRO 10 printf("in test function %d", MACRO); } main() { printf("in main %d",MACRO); func(); testfunc(); getch(); }

Wipro,

2 2162

typedef struct { int i:8; char c:9; float f:20; }st_temp; int getdata(st_temp *stptr) { stptr->i = 99; return stptr->i; } main() { st_temp local; int i; local.c = 'v'; local.i = 9; local.f = 23.65; printf(" %d %c %f",local.i,local.c,local.f); i = getdata(&local); printf("\n %d",i); getch(); } why there there is an error during compiling the above program?

1 4894

Can i use Two or More Main Funtion in any C program.?

4 4971

Why the below program throughs error during compilation? #include #include enum { ZERO, ONE, TWO, }; main() { printf("%d",&TWO); getch(); }

2 1905


Post New C Questions






Un-Answered Questions { C }

Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays

1018


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

3876


1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.

1494


GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA

633


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

813






What is the difference between if else and switchstatement

479


please explain every phase in the "SDLC" in the dotnet.

1362


ATM machine and railway reservation class/object diagram

3991


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

2098


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

710


Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.

976


what type of questions arrive in interview over c programming?

796


how to execute a program using if else condition and the output should enter number and the number is odd only...

821


Write a c program to build a heap method using Pointer to function and pointer to structure ?

3370


Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.

1373