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

what is the difference between getch() and getchar()?

10 Answers   Huawei, Infosys,


difference between semaphores and mutex?

1 Answers  


Give a fast way to multiply a number by 7

15 Answers   Accenture, Aricent, Microsoft,


Why preprocessor should come before source code?

2 Answers  


What 'lex' does?

0 Answers   Tech Mahindra,


main() { float f1=10.5; double db1=10.5 if(f1==db1) printf("a"); else printf("b") }

2 Answers   CSC,


Is c compiled or interpreted?

0 Answers  


what is the use of bitfields & where do we use them?

2 Answers  


please help me.. how to write a code of this output?? "Enter range number:"10 1 is an odd number 2 is an even numbers 3 in an odd numbers 4 " to 10" "printing all odd numbers:" 1,3,5,7,9 "printing all even numbers:" 2,4,6,8,10 "sum of all odd numbers:25 "sum of all even numbers:30 using a C Programming ARRAY pleas pleas help.. its my project ..please :(

1 Answers  


18)struct base {int a,b; base(); int virtual function1(); } struct derv1:base{ int b,c,d; derv1() int virtual function1(); } struct derv2 : base {int a,e; } base::base() { a=2;b=3; } derv1::derv1(){ b=5; c=10;d=11;} base::function1() {return(100); } derv1::function1() { return(200); } main() base ba; derv1 d1,d2; printf("%d %d",d1.a,d1.b) o/p is a)a=2;b=3; b)a=3; b=2; c)a=5; b=10; d)none 19) for the above program answer the following q's main() base da; derv1 d1; derv2 d2; printf("%d %d %d",da.function1(),d1.function1(),d2.function1 ()); o/p is a)100,200,200; b)200,100,200; c)200,200,100; d)none 20)struct { int x; int y; }abc; you can not access x by the following 1)abc-->x; 2)abc[0]-->x; abc.x; (abc)-->x; a)1,2,3 b)2&3 c)1&2 d)1,3,4

1 Answers  


write a C code To reverse a linked list

2 Answers   Motorola, Wipro,


Write a program to know whether the input number is an armstrong number.

0 Answers   Wipro,


Categories