Q:

C program to print a string (printf function )

0

C program to print a string

The printf function prints the argument passed to it (a string). Next, we will see how to print it if it's stored in a character array.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include <stdio.h>
int main()
{
   char z[100] = "I am learning C programming language.";

   printf("%s", z); // %s is format specifier

   return 0;
}

 

Output:
I am learning C programming language.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now