C Interview Questions
Questions Answers Views Company eMail

what is output of the following statetment?Printf(“%x”, -1<<4); ?

5 4840

will the program compile? int i; scanf(“%d”,i); printf(“%d”,i);

3 2134

write a string copy function routine?

2 2415

swap two integer variables without using a third temporary variable?


6 4828

how do you redirect stdout value from a program to a file?

1 1658

write a program that finds the factorial of a number using recursion?

Infosys, TATA,

13 23539

write a “Hello World” program in “c” without using a semicolon?

TCS, Wipro, CTS,

9 7782

Give a method to count the number of ones in a 32 bit number?

4 2182

write a program that print itself even if the source file is deleted?

2 4592

Given an unsigned integer, find if the number is power of 2?

5 4200

what is the difference between these initializations? Char a[]=”string”; Char *p=”literal”; Does *p++ increment p, or what it points to?

4 3737

differentiate between const char *a; char *const a; and char const *a;

TCS, HCL, College School Exams Tests,

2 4568

Why cann't whole array can be passed to function as value.

1 1869

Given a single Linked list with lakhs of nodes and length unknown how do you optimally delete the nth element from the list?


1 2539

What is the relation between # and include


5 4619

Post New C Questions

Un-Answered Questions { C }

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


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm


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




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


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




Give basis knowledge of web designing ...


#include #include struct stu { int i; char j; }; union uni { int i; char j; }; void main() { int j,k; clrscr(); struct stu s; j=sizeof(s); printf("%d",j); union uni u; k=sizeof(u); printf("%d",k); getch(); } what is value of j and k.


How to draw the flowchart for structure programs?


design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.


while initialization of array why we use a[][2] why not a[2][]...?


program to convert a integer to string in c language'


void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply


Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.