Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am a student learning C programming. I am using Visual Studio 2017, so i think there is no issues using _s(underscore s). I am

I am a student learning C programming. I am using Visual Studio 2017, so i think there is no issues using _s(underscore s). I am having an error whenever i try to run this code. My program can be built but have memory error. Is there anything i miss out for using VS2017 because it is known to be staying with standalone codes even though same language. Thanks.

#include "stdafx.h" #include "string.h" #include "stdlib.h" int main() { char name[11] = "John Terry"; printf("My name is %s ", name);

name[2] = 'I'; printf("My name is %s ", name);

char food[] = "burger"; printf("I love %s ", food); strcpy_s(food, "chocalate"); printf_s("I love %s ", food); return 0; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Is there just cause to dismiss Bonita? Explain your answer.

Answered: 1 week ago