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 are the basic data types associated with c?

0 Answers  


difference between c and c++?

2 Answers  


hat is a pointer?

4 Answers   Assurgent,


what is the purpose of the code, and is there any problem with it. bool f( uint n ) { return (n & (n-1)) == 0; }

1 Answers   Google,


What are two dimensional arrays alternatively called as?

0 Answers  






24.what is a void pointer? 25.why arithmetic operation can’t be performed on a void pointer? 26.differentiate between const char *a; char *const a; and char const *a; 27.compare array with pointer? 28.what is a NULL pointer? 29.what does ‘segmentation violation’ mean? 30.what does ‘Bus Error’ mean? 31.Define function pointers? 32.How do you initialize function pointers? Give an example? 33.where can function pointers be used?

0 Answers  


What is the process to create increment and decrement stamen in c?

0 Answers  


EXPLAIN #INCLUDE<STDIO.H> EXPLAIN #INCLUDE<CONIO.H>

4 Answers  


How can I find out the size of a file, prior to reading it in?

0 Answers  


How can I increase the allowable number of simultaneously open files?

1 Answers   CSC,


The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.

0 Answers  


I have a varargs function which accepts a float parameter?

0 Answers  


Categories