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


Please Help Members By Posting Answers For Below Questions

How many types of operator or there in c?

607


What is a program flowchart and how does it help in writing a program?

669


Can you subtract pointers from each other? Why would you?

563


What is strcpy() function?

662


What do you mean by a sequential access file?

631






What does the message "automatic aggregate intialization is an ansi feature" mean?

698


What does the characters “r” and “w” mean when writing programs that will make use of files?

862


Between macros and functions,which is better to use and why?

1572


What is the benefit of using const for declaring constants?

592


What are the keywords in c?

647


Is c is a procedural language?

601


How would you rename a function in C?

625


Write a program to generate random numbers in c?

667


Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......

1749


How is null defined in c?

656