print ur name 20,000 times without using inbuilt library
functions like printf,scanf,gets,puts,getchar or putchar
Answer Posted / nsaa
#include<stdio.h>
#include <unistd.h>
int main()
{
int fd,i;
char *name="myname\n";
for(i=0;i<20000;i++)
write(STDOUT_FILENO,name,sizeof(name));
}
| Is This Answer Correct ? | 10 Yes | 10 No |
Post New Answer View All Answers
What is difference between constant pointer and constant variable?
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
How can I do graphics in c?
What is struct node in c?
find out largest elemant of diagonalmatrix
What is typeof in c?
What are the 4 types of programming language?
Differentiate between full, complete & perfect binary trees.
How can I find the modification date and time of a file?
How can a string be converted to a number?
What's a good way to check for "close enough" floating-point equality?
Why can’t constant values be used to define an array’s initial size?
what will be maximum number of comparisons when number of elements are given?
How to find a missed value, if you want to store 100 values in a 99 sized array?
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }