TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ajit N
NA
352
71.4k
how to solve error "stack around variable was corrupted" ?
Sep 29 2019 12:23 PM
Hi, i got error in c program. the program is on arithmatic operation, in this output displaying properly, but when i press enter after seeing output then it will show me error like "stack around variable ch was corrupted"
below is my sample code
#include<stdio.h>
#include<conio.h>
void
Add(
int
x,
int
y)
{
printf(
"%d"
,x+y);
}
void
main()
{
int
a;
int
b;
char
ch;
scanf(
"%d"
,&a);
scanf(
"%s"
,&ch);
scanf(
"%d"
,&b);
switch
(ch)
{
case
'+'
:
Add(a,b);
break
;
}
getch();
}
so help me how can i solve this ?
Reply
Answers (
1
)
C++ Pointer to an Array
Url Error in django python