print a "hello" word without using printf n puts in c language
Answer Posted / 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 |
Post New Answer View All Answers
What is the use of a semicolon (;) at the end of every program statement?
How can my program discover the complete pathname to the executable from which it was invoked?
Write a program to print “hello world” without using semicolon?
What is sizeof in c?
What is keyword in c?
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
What is a macro, and explain how do you use it?
Can you please explain the difference between exit() and _exit() function?
`write a program to display the recomended action depends on a color of trafic light using nested if statments
What is a structure in c language. how to initialise a structure in c?
Why we use break in c?
What is a header file?
p*=(++q)++*--p when p=q=1 while(q<=6)
What is a far pointer in c?
Tell me with an example the self-referential structure?