Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why am I getting a question mark in terminal? #151

Open
Razvan-drb opened this issue Nov 27, 2019 · 0 comments
Open

why am I getting a question mark in terminal? #151

Razvan-drb opened this issue Nov 27, 2019 · 0 comments

Comments

@Razvan-drb
Copy link

I have written the code in lesson 9 just like described, but I am getting a question mark at the end of my name.
#include <stdio.h>
#include <stdlib.h>

int main()
{

int age;
int currentYear;
int birthYear;

currentYear = 2019;
birthYear = 1989;
age = currentYear - birthYear;

printf("Razvan is %d years old \n", age);

char name[6] = "Razvan";
printf("My name is %s \n", name);

name[3] = 'w';
printf("My name is %s \n", name);

char food[] = "bacon";
printf("The best food is %s \n", food);

strcpy(food, "sarmale");
printf("But not after %s \n", food);



return 0;

}
Capture d’écran 2019-11-27 à 14 45 59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant