What will this program print? - C String

C examples for String:char array

Description

What will this program print?

Demo Code

#include <stdio.h> 
int main(void) 
{ 
   char note[] = "this is a test."; 
   char *ptr; //ww  w  .j  a  va2  s  . c o  m
 
   ptr = note; 
   puts(ptr); 
   puts(++ptr); 
   note[7] = '\0'; 
   puts(note); 
   puts(++ptr); 
   return 0; 
}

Result


Related Tutorials