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
5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.
How can I direct output to the printer?
#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }
Why c is faster than c++?
What is the function of multilevel pointer in c?
What is hungarian notation? Is it worthwhile?
What is malloc calloc and realloc in c?
Why do we use pointer to pointer in c?
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
Why are all header files not declared in every c program?
which is an algorithm for sorting in a growing Lexicographic order
How do I copy files?
How to implement a packet in C
When is a “switch” statement preferable over an “if” statement?
Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.