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 to set file pointer to beginning c?
What does int main () mean?
Is there a built-in function in C that can be used for sorting data?
How many bytes are occupied by near, far and huge pointers (dos)?
Is c is a high level language?
Is it possible to pass an entire structure to functions?
how to write a program which adds two numbers without using semicolon in c
how to print "hai" in c?
Write a program to generate random numbers in c?
Why doesnt long int work?
What is the role of && operator in a program code?
where do we use structure pointer?