in C-programming language without using printf statement
can we get output r not ? if yes how and if no also how ?
Answers were Sorted based on User's Feedback
Answer / balakrushna (bk)
Yes.
We can get output using puts() for printing a string or
putchar() for printing single character.
So printf() is not necessary here for printing.
| Is This Answer Correct ? | 74 Yes | 19 No |
Answer / vignesh1988i
ya wit out using printf we can print.... using putchar,puts
functions etc.........
| Is This Answer Correct ? | 41 Yes | 14 No |
Answer / pratap
well, dats fine !!
But can ne1 tell me, is it possible to print sumthing widout
using any LIBRARY FUNCTION ??
| Is This Answer Correct ? | 28 Yes | 10 No |
Answer / bhupendra dhire
/*this program is without printf() and without (;) using far pointer and functions */
int display(char *ch)
{
char far *p;
int i;
static int c=0;
p=(char far *)0xb8000000l;
for(i=0;ch[i]!='\0';i++,c=c+2)
p[c]=ch[i];
}
void main()
{
if(display("BHUPENDRA DHIRE ")){}
}
| Is This Answer Correct ? | 21 Yes | 11 No |
Answer / murali
it is possible . with using if condition and library
function
| Is This Answer Correct ? | 16 Yes | 9 No |
Answer / bandla.madhu
don't say puts&putchar.we have to think ina manner that how
to write code for printf function.ofcourse those two are
also correct.
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / shreya jha
it's possible to print something using if and without semicolon(;)
#include<stdio.h>
#include<conio.h>
int main()
{
if(printf("HELLO USER"))
{
}
getch();
return 0;
}
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / mahendran
#include<graphics.h>
#include<conio.h>
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm, "");
outtextxy(75,170,"Welcome");
getch();
}
| Is This Answer Correct ? | 5 Yes | 2 No |
Answer / murali
my qyestion is without using library function how can print?
| Is This Answer Correct ? | 6 Yes | 6 No |
Answer / gokul
It's impossible without using any library function
| Is This Answer Correct ? | 3 Yes | 6 No |
how to find out the union of two character arrays?
main() { int i=5; printf("%d",++i + i); } output is 10 ------------------------ main() { int i=5; printf("%d",i++ + i); }output is 12 why it is so? give appropiate reason....
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
Find the largest number from the given 2 numbers without using any loops and the conditional operator.
What is bash c?
If errno contains a nonzero number, is there an error?
What is ## preprocessor operator in c?
main() { static char *s[]={"black","white","yellow","voilet"}; char **ptr[]={s+3,s+2,s+1,s}, ***p; p=ptr; **++p; printf("%s",*--*++p+3); }
WHAT IS INT?
What is header file in c?
I have an array of 100 elements. Each element contains some text. i want to: append a star character to the end of every fifth element remove every second character from every tenth element, and… add a line feed (ascii 10) after the 30th character of every array element whose length is greater than 30 characters.
wat is the output int main() { char s1[]="Hello"; char s2[]="Hello"; if(s1==s2) printf("Same"); else printf("Diff"); }