print ur name 20,000 times without using inbuilt library
functions like printf,scanf,gets,puts,getchar or putchar
Answers were Sorted based on User's Feedback
Answer / gaurav
char far* src = (char far*) 0xB8000000L; *src = 'M'; src
+= 2; *src = 'D';
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / 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 |
Answer / shrikantauti
in the question itself there is clearly written print which means we must use either printf or puts. else otherwise it is not possible.
Is This Answer Correct ? | 1 Yes | 6 No |
Answer / dasari chaithanya
#include<stdio.h>
#include<conio.h>
void main()
{
char ch[20];
for(ch=0;ch<=20000;ch++)
if( printf("chaithanya"));
else if("data is wrong");
}
Is This Answer Correct ? | 0 Yes | 42 No |
#include<stdio.h> void main() { int a=5,b=6,c; int x=(a<b)+7; int y=(x==7)*9; int z=(c=x+y)*2; printf("%h %h %h",x,y,z); } What is the output? Explain it.
program for validity of triangle from 3 side
What is the use of pragma in embedded c?
What does char * * argv mean in c?
What is difference between union and structure in c?
In header files whether functions are declared or defined?
Given an array of characters, how would you reverse it? How would you reverse it without using indexing in the array?
What is getch () for?
what is ram?
Are the variables argc and argv are local to main?
What is scope rule in c?
what is difference between ++(*p) and (*p)++
17 Answers Accenture, HCL, IBM,