logoISU  

CS 456 - Systems Programming

Spring 2024

Displaying ./code/feb21/string1.c

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define BUF 512

int main(int argc, char **argv){

	char words[BUF];
	
	if(argc < 2)
		strcpy(words, "Nothing here");
	else
		strcpy(words, argv[1]);

	printf("argv[1]: %s\n", words);


	return 0;

}