What will this program print, while loop and printf - C Language Basics

C examples for Language Basics:printf

Description

What will this program print, while loop and printf

Demo Code

#include <stdio.h> 
#define TEN 10 /*w  w  w  .jav  a  2s. c  o  m*/
int main(void) 
{ 
     int n = 0; 
 
     while (n++ < TEN) 
          printf("%5d", n); 
     printf("\n"); 
     return 0; 
}

Result


Related Tutorials