C Interview Questions
Questions Answers Views Company eMail

what will be the output of the following program, justify? #define TEST int TEST getdata() { static i; i+=10; return i; } main() { int k; k = getdata(); }

3 4369

"I LOVE MY COUNTRY" write a c program to get "COUNTRY MY LOVE I" as the output. Use any other programming language. It is not mandatory to use C.

ABC Infotech, ADP, College School Exams Tests, Kovair,

11 32299

write a program to sum of its digit with using control structure or with out using loop. for ex: let the number is 25634 then answer will be=2+5+6+3+4=20

4 10104

what would be the output of the following prog? Justify your answer? main() { unsigned char ch; unsigned char i; ch = -255; printf("%d",ch); i = -1; printf("%d",i); }

1 3166

int x=5; printf("%d%d%d",x,x<<2,x>>2);

TANCET,

2 5351

how do we remove the printed character in printf statement and write next it it

1 3068

hi, which software companys will take,if d candidate's % is jst 55%?

1748

how can i print "hello"

3 4728

difference between c and c++

3 4970

what is purpose of fflush(stdin) function

4 31170

how can i print "hello".please consider inverted commas as well.i want to print on console: "hello"

Wipro,

4 11158

how to compare two strings without using strcmp() function??

1 4856

how can i get the string which is having two spaces at the end.suppose the string is "Hello World ".Now at the end i have two spaces.i need to print with that spaces .

1 3250

what is the output for this question: main() { int i=1; printf("%d%d%d",i,i++,++i); }

9 8490

# define x=1+4; main() { int x; printf("%d%d",x/2,x/4); }

5 8210


Post New C Questions

Un-Answered Questions { C }

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

2092


Can you please compare array with pointer?

705


How can you be sure that a program follows the ANSI C standard?

1234


What 'lex' does?

819


Explain the difference between #include "..." And #include <...> In c?

708






What does. int *x[](); means ?

719


write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)

1717


What are valid operations on pointers?

802


What is the advantage of using #define to declare a constant?

717


Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers

1525


What is call by value in c?

653


Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?

2214


Why c is a mother language?

638


What are c preprocessors?

781


What does static variable mean in c?

753