answersLogoWhite

0

Example:

printf ("There is one semicolon; in this string");

printf ("There is no semicolon in this string");

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Can you print string without using semi column in printf statement in c programming?

If you forget the semicolon, your program won't compile.


Can anyone give a logic in c plus plus to print something on screen using printf statement but without semicolon used after printf statement?

try to usecondition ? value if true : value if falseor: if (printf ("Hello")) {}


How can we write our name in C programming language without using printf?

You can use fputs() instead of printf().


Can an for loop be terminated with a semicolon in c language?

Sure.for (i=0; i


How you create c program without semicolon?

int main () {}


How can write the name in c plus plus language without using cout statement?

I believe, you can use C-function - printf().


Which symbol is used as a statement terminator in C?

semicolon ';' (Not applicable for block-statements)


Write a program to find the largest of three numbers and print the output in ascending order?

void main() { int a,b,c; clrscr(); printf("Enter the value of a:"); scanf("%d",&a); printf("\nEnter the value of b:"); scanf("%d",&b); printf("\nEnter the value of c:"); scanf("%d",&c); if(a>b) { if(a>c) { if(b>c) { printf("c is smallest\n"); printf("b is middle\n"); printf("a is largest\n"); } else { printf("b is smallest\n"); printf("c is middle\n"); printf("a is largest\n"); } } else { printf("b is smallest\n"); printf("a is middle\n"); printf("c is largest\n"); } } else if(b>c) { if(a>c) { printf("c is smallest\n"); printf("a is middle\n"); printf("b is largest\n"); } else { printf("a is smallest\n"); printf("c is middle\n"); printf("b is largest\n"); } } else { printf("a is smallest\n"); printf("b is middle\n"); printf("c is largest\n"); } getch(); }


How do you write an output without using printf function in c?

Yes. However, C is a type-sensitive language thus PRINTF and printf would need to be defined as separate functions. However, names using all caps are conventionally used to denote macros in C thus you can easily define PRINTF as an alias for printf: #define PRINTF printf; int main (void) { PRINTF ("%d", 42); } The C precompiler will substitute all instances of the symbol PRINTF with printf, thus the code seen by the compiler will become: int main (void) { printf ("%d", 42); }


How do you display semi colon without using semi colon in a c program?

main() { if(printf("%c",59)) }


Is output function printf can not be used in C plus plus programs?

Whoever said so, they were wrong. For sure "printf" can be used without any problem.


C program to find the largest and smallest of three numbers using IF IF ELSE?

#include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("Enter any three numbers"); scanf("%d%d%d",&a,&b,&c); if(a>b&&a>c) printf("A is greatest"); else if(b>a&&a>c) printf("B is greatest"); else if(c>a&&c>b) printf("C is greatest"); if(a<b&&a<c) printf("A is smallest"); else if(b<a&&b<c) printf("B is smallest"); else if(c<a&&c<b) printf("C is smallest"); getch(); }