what is a NULL Pointer? Whether it is same as an uninitialized pointer?
762
Differentiate fundamental data types and derived data types in C.
621
What is c language & why it is used?
586
What is the difference between far and near in c?
604
How can a program be made to print the line number where an error occurs?
654
why to assign a pointer to null sometimes??how can a pointer
we declare get assigned with a garbage value by default???
1522
Write a program to print factorial of given number using recursion?
607
What is %d used for?
589
What is the translation phases used in c language?
640
What is volatile keyword in c?
587
In C, What is the #line used for?
1072
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 )
{
}
2220
What is the equivalent code of the following statement in WHILE LOOP format?
772
What is the use of a semicolon (;) at the end of every program statement?
780
#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.
5216