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



print ur name 20,000 times without using inbuilt library functions like printf,scanf,gets,puts,get..

Answer / gaurav

char far* src = (char far*) 0xB8000000L; *src = 'M'; src
+= 2; *src = 'D';

Is This Answer Correct ?    3 Yes 1 No

print ur name 20,000 times without using inbuilt library functions like printf,scanf,gets,puts,get..

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

print ur name 20,000 times without using inbuilt library functions like printf,scanf,gets,puts,get..

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

print ur name 20,000 times without using inbuilt library functions like printf,scanf,gets,puts,get..

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

Post New Answer

More C Interview Questions

#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.

8 Answers   IBM,


program for validity of triangle from 3 side

7 Answers  


What is the use of pragma in embedded c?

0 Answers  


What does char * * argv mean in c?

0 Answers  


What is difference between union and structure in c?

0 Answers  






In header files whether functions are declared or defined?

1 Answers   TCS,


Given an array of characters, how would you reverse it? How would you reverse it without using indexing in the array?

1 Answers   Microsoft,


What is getch () for?

0 Answers  


what is ram?

3 Answers   TCS,


Are the variables argc and argv are local to main?

0 Answers   TISL,


What is scope rule in c?

0 Answers  


what is difference between ++(*p) and (*p)++

17 Answers   Accenture, HCL, IBM,


Categories