Changed LC21 folder structure

This commit is contained in:
Louise Brown
2022-11-22 11:56:38 +00:00
parent caee190d05
commit fefda4652a
2 changed files with 0 additions and 0 deletions

23
LC21/Sprints/sprints.c Normal file
View File

@@ -0,0 +1,23 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main(void)
{
char buffer[100];
int age=6;
char name[6];
/* This command copies "James" into the character array 'Name' */
strcpy(name,"James");
/* Print to the string (rather than screen) */
sprintf(buffer,"Name: %s, Age %d ",name,age);
/* And output the string created */
printf("\n->%s\n",buffer);
return 0;
}