C Interview Questions
Questions Answers Views Company eMail

what's the o/p int main(int n, char *argv[]) { char *s= *++argv; puts(s); exit(0); }

Motorola,

1 4066

how to determine the complexity of an algorithm as log(n)

Google,

1 3044

how to do in place reversal of a linked list(singly or doubly)?

3 6606

wats the diference btwen constant pointer and pointer to a constant.pls give examples.

9 19347

Explain in detail how strset (string handling function works )pls explain it with an example.

1 10521

dibakar & vekatesh..uttejana here..abt ur reply for in place reversal of linked list..wats p stands for there?

1 3222

How to calculate Total working time using Login and logout?

CTS, Cygnus, Infosys, Signal Networks, TCS, Wipro,

2 10332

how do u find out the number of 1's in the binary representation of a decimal number without converting it into binary(i mean without dividing by 2 and finding out the remainder)? three lines of c code s there it seems...can anyone help

5 8236

wats SIZE_T meant for?

1 3541

how to calculate the time complexity of a given algorithm? pls give exaples..mainly for the coplexities such as O(log n),O(n log n)...

Infosys,

1 7918

can anyone suggest some site name..where i can get some good data structure puzzles???

1637

Is there any restriction in how many arguments printf or scanf function can take? in which file in my c++ compiler i can see the code for implementation of these two functions??

4 9976

WHY DO WE USE A TERMINATOR IN C LANGUAGE?

2 11069

how to find out the inorder successor of a node in a tree??

TCS, Yahoo,

2 12541

what is the different bitween abap and abap-hr?

TCS,

1732


Post New C Questions

Un-Answered Questions { C }

How to write a multi-statement macro?

610


main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above

603


I heard that you have to include stdio.h before calling printf. Why?

576


What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?

576


which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;

2378






Where static variables are stored in c?

575


What is the function of volatile in c language?

653


What are dangling pointers in c?

629


What is malloc() function?

628


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

2197


What is ponter?

761


Why main is used in c?

575


What's the best way of making my program efficient?

614


how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....

1364


What is the use of typedef in structure in c?

532