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 are the basic data types associated with c?
difference between c and c++?
hat is a pointer?
what is the purpose of the code, and is there any problem with it. bool f( uint n ) { return (n & (n-1)) == 0; }
What are two dimensional arrays alternatively called as?
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?
What is the process to create increment and decrement stamen in c?
EXPLAIN #INCLUDE<STDIO.H> EXPLAIN #INCLUDE<CONIO.H>
How can I find out the size of a file, prior to reading it in?
How can I increase the allowable number of simultaneously open files?
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.
I have a varargs function which accepts a float parameter?