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 |
What's the difference between calloc() and malloc()?
Which one would you prefer - a macro or a function?
how to find anagram without using string functions using only loops in c programming
how can i print "hello".please consider inverted commas as well.i want to print on console: "hello"
How can I get the current date or time of day in a c program?
WHAT IS MAXIMUM SIZE OF AN ARRAY IN C LANGUAGE?
8 Answers Carphone Warehouse, IBM, SAS,
when user give a number it multiply with 9 without useing '+' and '*' oprator
why effort estimation is important?
Are the expressions * ptr ++ and ++ * ptr same?
What is hungarian notation? Is it worthwhile?
Explain how does flowchart help in writing a program?
main() { int x=5; printf("%d %d %d\n",x,x<<2,x>>2); }
11 Answers CISOC, CitiGroup, College School Exams Tests,