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

What is the concatenation operator?

0 Answers  


hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel

0 Answers  


What is the Lvalue and Rvalue?

2 Answers  


Write a C program to perform some of the operation which can be performed using Single linked list

1 Answers   Qualcomm,


What is scanf_s in c?

0 Answers  


What are the benefits of c language?

0 Answers  


What is && in c programming?

0 Answers  


2. Write a function called hms_to_secs() that takes three int values&#8212;for hours, minutes, and seconds&#8212;as arguments, and returns the equivalent time in seconds.. Create a program that exercises this function by repeatedly obtaining a time value in hours, minutes, and seconds from the user (format 12:59:59), calling the function, and displaying the value of seconds it returns.

5 Answers   TCS,


Define and explain about ! Operator?

0 Answers  


What is the difference between int and float?

3 Answers  


Taking an example,differentiate b/w loader and linker ?

1 Answers  


What is the difference between null pointer and wild pointer?

0 Answers  


Categories