void main()
{
int c;
c=printf("Hello world");
printf("\n%d",c);
}
Answers were Sorted based on User's Feedback
Answer / vijeselvam
Hello world
11 /*if their is single space between the words that are
printed*/
12 /*if their is double space between the words that are
printed*/
| Is This Answer Correct ? | 2 Yes | 0 No |
main() { char *p="hai friends",*p1; p1=p; while(*p!='\0') ++*p++; printf("%s %s",p,p1); }
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.
6 Answers Fusion Systems GmbH,
Is this code legal? int *ptr; ptr = (int *) 0x400;
What are the following notations of defining functions known as? i. int abc(int a,float b) { /* some code */ } ii. int abc(a,b) int a; float b; { /* some code*/ }
main() { int i=1; while (i<=5) { printf("%d",i); if (i>2) goto here; i++; } } fun() { here: printf("PP"); }
int main() { int x=10; printf("x=%d, count of earlier print=%d", x,printf("x=%d, y=%d",x,--x)); getch(); } ================================================== returns error>> ld returned 1 exit status =================================================== Does it have something to do with printf() inside another printf().
How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?
int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }
why nlogn is the lower limit of any sort algorithm?
main() { int y; scanf("%d",&y); // input given is 2000 if( (y%4==0 && y%100 != 0) || y%100 == 0 ) printf("%d is a leap year"); else printf("%d is not a leap year"); }
What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }
#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }