print a "hello" word without using printf n puts in c language

Answers were Sorted based on User's Feedback



print a "hello" word without using printf n puts in c language..

Answer / prince

write(1, "Hello World", 11);

Is This Answer Correct ?    11 Yes 10 No

print a "hello" word without using printf n puts in c language..

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

print a "hello" word without using printf n puts in c language..

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

print a "hello" word without using printf n puts in c language..

Answer / sandeep kumar yadav

fprintf(stdout,"Hello");

Is This Answer Correct ?    11 Yes 15 No

print a "hello" word without using printf n puts in c language..

Answer / ricky

fputs("Hello",stdout)

Is This Answer Correct ?    4 Yes 10 No

print a "hello" word without using printf n puts in c language..

Answer / smith

#include<stdio.h>
#include<string.h>
void main()
{
printf("hello");
puts("hello");
}

Is This Answer Correct ?    3 Yes 23 No

Post New Answer

More C Interview Questions

How to set file pointer to beginning c?

0 Answers  


What does int main () mean?

0 Answers  


Is there a built-in function in C that can be used for sorting data?

0 Answers  


How many bytes are occupied by near, far and huge pointers (dos)?

0 Answers  


Is c is a high level language?

0 Answers  






Is it possible to pass an entire structure to functions?

0 Answers  


how to write a program which adds two numbers without using semicolon in c

2 Answers  


how to print "hai" in c?

13 Answers   TCS,


Write a program to generate random numbers in c?

0 Answers  


Why doesnt long int work?

0 Answers  


What is the role of && operator in a program code?

0 Answers  


where do we use structure pointer?

1 Answers  


Categories