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

Answer Posted / rajeev

int main()
{
if(printf("hello world"))
}

For if statement compiler does not expect semi colon.

Is This Answer Correct ?    55 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a code to generate a series where the next element is the sum of last k terms.

730


Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.

1589


What is the difference between test design and test case design?

1564


Is javascript written in c?

578


What are the features of c languages?

624






Which driver is a pure java driver

987


the question is that what you have been doing all these periods (one year gap)

1615


What is the meaning of typedef struct in c?

591


What are dangling pointers? How are dangling pointers different from memory leaks?

619


What is cohesion in c?

537


What is wrong in this statement?

601


Explain how can you check to see whether a symbol is defined?

659


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

649


Explain what header files do I need in order to define the standard library functions I use?

645


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

2205