print a "hello" word without using printf n puts in c language
Answers were Sorted based on User's Feedback
Answer / anil h m
#include <stdio.h>
int main() {
char *p = "Welcome to C!
";
long l = 14;
long fd = 1;
long syscall = 1;
long ret = 0;
__asm__ ( "syscall"
: "=a" (ret)
: "a" (syscall),
"D" (fd),
"S" (p),
"d" (l)
);
return 0;
}
| Is This Answer Correct ? | 0 Yes | 2 No |
Answer / taz
ch[6]={'h','e','l','l','o','\0'};
i=0;
do
{
putchar(ch[i]);
i++;
}while(ch[i]!=NULL)
| Is This Answer Correct ? | 5 Yes | 8 No |
Answer / smith
#include<stdio.h>
#include<string.h>
void main()
{
printf("hello");
puts("hello");
}
| Is This Answer Correct ? | 3 Yes | 23 No |
How we can insert comments in a c program?
What functions are in conio h?
what is ans for this scanf(%%d",c);
a<<1 is equivalent to a) multiplying by 2 b) dividing by 2 c) adding 2 d)none of the above
Whats wrong with the following function char *string() { char *text[20]; strcpy(text,"Hello world"); return text; }
Reverse the part of the number which is present from position i to j. Print the new number. eg: num=789876 i=2 j=5 778986
What is the c value paradox and how is it explained?
Here is alphabets : abcdefgh 1) how to reverse. as hgfedcba 2) after reversal, how to group them in a pair hg fe dc ba.
What is a constant?
Explain what is the difference between declaring a variable and defining a variable?
Is c++ based on c?
What are # preprocessor operator in c?