Tags » NULL Character

C Program to display successive string in case first string is not terminated with null character

#include”stdio.h”
#include”conio.h”
void main()
{
char name1[6]={‘S’,’A’,’N’,’J’,’A’,’Y’);
char name2[7]={‘S’,’A’,’N’,’J’,’A’,’Y’);
clrscr();
printf(“Name1 = %s”,name1);
printf(“Name2 = %s”,name2);
getch();
}

Elites9

C Program to display the output of null character is not considered

#include”stdio.h”
#include”conio.h”
void main()
{
char name1[6]={‘S’,’A’,’J’,’A’,’Y’};
clrscr();
printf(“Name1 = %s”,name1);
getch();
}

Elites9