C Interview Questions
Questions Answers Views Company eMail

In which area global, external variables are stored?

3 4584

what is inline function?

2 2694

why program counter is 16 bit?

3 2977




void main() { int a=1; printf("%d %d %d",a,++a,a++); } the output is supposed to be 1 2 2....but it is 3 3 1 this is due to calling conventions of C. if anyone can explain me how it happens?

7 15674

can we define a function in structure?

2 3683

can we declare a function in side the structure?

HCL,

2 2293

can we initialize all the members of union?

2 4746

what is the structure pointer?

Accenture, HCL,

912




where do we use volatile keyword?

1 2300

Find greatest of two numbers using macro

Siemens, Bosch,

4 28622

what will be the output of this program........ main() { int a=2,b=4,c=6; printf("%d"); } why it gives the value of third variable.

HCL,

6 3316

increment operateor (++)and decrament(--) #include #inclide main() { int x=15; while(x!=0) scanf("%d",&x); {

Syntel, HCL, TCS,

2 2898

Describe for loop and write a c program to sum the series X + x2/2! + x3 /3! + …….. up to fifteen terms.

2 8313

Develop a flow chart and write a c program to find the roots of a quadratic equation ax2+bx+c=0 using switch and break statement.

TCS,

1 9680

Can you write the algorithm for Queue?

TCS, College School Exams Tests,

795


Post New C Questions






Un-Answered Questions { C }

FILE PROGRAMMING

993


write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1

1168


Write a program that accept anumber in words

481


I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...

8251


provide an example of the Group by clause, when would you use this clause

914






Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

10063


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.

870


Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?

810


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

2079


which is an algorithm for sorting in a growing Lexicographic order

631


Between macros and functions,which is better to use and why?

810


how to count no of words,characters,lines in a paragraph.

3100


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

2977


I need testPalindrome and removeSpace #include #define SIZE 256 /* function prototype */ /* test if the chars in the range of [left, right] of array is a palindrome */ int testPalindrome( char array[], int left, int right ); /* remove the space in the src array and copy it over to the "copy" array */ /* set the number of chars in the "copy" array to the location that cnt points t */ void removeSpace(char src[], char copy[], int *cnt); int main( void ) { char c; /* temporarily holds keyboard input */ char string[ SIZE ]; /* original string */ char copy[ SIZE ]; /* copy of string without spaces */ int count = 0; /* length of string */ int copyCount; /* length of copy */ printf( "Enter a sentence:\n" ); /* get sentence to test from user */ while ( ( c = getchar() ) != '\n' && count < SIZE ) { string[ count++ ] = c; } /* end while */ string[ count ] = '\0'; /* terminate string */ /* make a copy of string without spaces */ removeSpace(string, copy, ©Count); /* print whether or not the sentence is a palindrome */ if ( testPalindrome( copy, 0, copyCount - 1 ) ) { printf( "\"%s\" is a palindrome\n", string ); } /* end if */ else { printf( "\"%s\" is not a palindrome\n", string ); } /* end else */ return 0; /* indicate successful termination */ } /* end main */ void removeSpace(char src[], char copy[], int *cnt) { } int testPalindrome( char array[], int left, int right ) { }

1116


application attempts to perform an operation?

700