answersLogoWhite

0


Best Answer

you can put the printf function inside a if() so that you need not use semicolons. for eg to print my name, if(printf("My Name is Maheedharan")) {} this will work. try this out...

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

9y ago

Use puts, fputs, write, fwrite, fprintf, putchar, putc, fputc or whatnot.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program in c language to print some message on the screen with out using printf?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do you write a C plus plus program that displays a pyramid of Xes on the screen using a for loop?

printf ("x")


Is printf keyword?

== == What is printf in c or prototype of printf with example (q) What is prototype of printf function ? Explain each term. Ans: Prototype of printf function is : int printf( const char *format ,…) Explanation of each term : Parameter of printf function is : (three continuous dots) : It is called ellipsis. It indicates the variable number of arguments. Example of ellipsis: #include void ellipsis(int a,...); void main() { int a=5,b=10; clrscr(); ellipsis(a,b); getch(); } void ellipsis(int a,...) { printf("%d ",a); } Output:5 So printf function can have any number of variables as an argument.


How can you print percent d on the screen using printf?

printf("Your text here %d", your_data); or maybe you want to see '%d' as output? Try one of these: printf ("%%d"); printf ("%cd", '%'); printf ("%s", "%d"); fputs ("%d", stdout);


Purpose of printf?

print means print, f means formattingorprintf is a output statement function in the C run-time libraryexample:printf ("the value of A is %d\n", A);


A c program for multiplication of two integers a and b?

/*PROGRAM TO ACCEPT TWO NUMBERS FROM THE USER AND PRINT THEIR MULTIPLICATION. */ #include<stdio.h> #include<conio.h> void main() { int a, b, c; // Declaration of Variables. Variables 'a' & 'b' to hold first & second number. And 'c' to hold result. clrscr(); // To clear the output screen every time program is executed. printf("\n Enter the first number : "); scanf("%d", &a); // To accept the first number. printf("\n Enter the second number : "); scanf("%d", &b); // To accept the second number. c = a*b; // Logic to get the product of the entered two numbers. printf("\n Multiplication of %d & %d = %d", a, b, c); // Displaying result. getch(); // To hold the output screen. }

Related questions

How do you write a C plus plus program that displays a pyramid of Xes on the screen using a for loop?

printf ("x")


Write an assembly language program to print a to z on screen?

write a program to print A to Z on screen in c?


How do you write a c program that divides the value of a real number by two and displays them on the screen?

void foo (double val) { printf ("Full value: %f\n", val); printf ("Half value: %f\n", val/2); }


How do you write a programme in c?

Basic Program in "C" #include <stdio.h> /*This is the standard input/output library function*/ main(void) /*All C programs must have the function main*/ { char ch; printf("This is a C Program."); /* Every line of code in C must end with a semi colon*/ printf("Welcome to C!");/*the printf outputs the line of text to the screen*/ scanf("%c%c", &ch, &ch); /* This is a trick way to pause the computer so you can read the information on the screen*/ return 0; /* Indicates that your program has terminated successfully*/


How do you print to the screen in C plus plus?

printf();


What is a purpose of printf and scanf statements?

we write printf() b/c it printf or show us the value contained in a value on the screen after pressing ctrl+f9.


Is printf keyword?

== == What is printf in c or prototype of printf with example (q) What is prototype of printf function ? Explain each term. Ans: Prototype of printf function is : int printf( const char *format ,…) Explanation of each term : Parameter of printf function is : (three continuous dots) : It is called ellipsis. It indicates the variable number of arguments. Example of ellipsis: #include void ellipsis(int a,...); void main() { int a=5,b=10; clrscr(); ellipsis(a,b); getch(); } void ellipsis(int a,...) { printf("%d ",a); } Output:5 So printf function can have any number of variables as an argument.


How do you fix out of memory at line 123 on computer?

Depends on what program is causing this. Can you upload a screen shot of this message?


How can you print percent d on the screen using printf?

printf("Your text here %d", your_data); or maybe you want to see '%d' as output? Try one of these: printf ("%%d"); printf ("%cd", '%'); printf ("%s", "%d"); fputs ("%d", stdout);


What is use of printf?

printf() is a build-in function under the header file 'stdio.h' in a C programming language. In c++,the same function is accomplished by 'cout' . It is used to display strings enclosed between double quotes. Its syntax is printf("...string/sentences/characters...."); After execution,all the characters between the double quotes will be displayed on the output screen.


What is the difference between the printf and scanf statements in C?

well major difference between scanf and printf is that scanf is an input statment and printf is an output stament scanf is used to take data in from the user and printf is used to display the result on the screen Regards


List the steps to get a printed screen of an error message?

The list of steps to get a printed screen of an error message begin with pressing the Print Screen key on your keyboard once. Look for the PrtScn key. The next step is to open an image editing program and paste the image into it. You can then save and print the image.