rubenvb
-8
Q:

How to make a printf in c

printf("");
2
#include <stdio.h>

int printf(const char *format, ...);

int main(void)
{
  int nb = 20;
 
  printf("Hello World !\n");
  printf("%d\n", nb);
  printf("%s/%d\n", "Nice", 20);
  return (0);
}

/// output :
///
///	Hello World !
///	20
///	Nice/20
///
1
printf("Hello World");
printf("your text here");
1
/* printf example */
#include <stdio.h>

int main()
{
   printf ("Characters: %c %c \n", 'a', 65);
   printf ("Decimals: %d %ld\n", 1977, 650000L);
   printf ("Preceding with blanks: %10d \n", 1977);
   printf ("Preceding with zeros: %010d \n", 1977);
   printf ("Some different radices: %d %x %o %#x %#o \n", 100, 100, 100, 100, 100);
   printf ("floats: %4.2f %+.0e %E \n", 3.1416, 3.1416, 3.1416);
   printf ("Width trick: %*d \n", 5, 10);
   printf ("%s \n", "A string");
   return 0;
}
2
// print hello world using c
printf("Hello World");
0
#include <stdio.h>

int main () {
   int ch;

   for( ch = 75 ; ch <= 100; ch++ ) {
      printf("ASCII value = %d, Character = %c\n", ch , ch );
   }

   return(0);
}
0
printf()
0
          int printf(const char *format, ...);
0

New to Communities?

Join the community