Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about illegal-instruction

Read more about illegal-instruction

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - illegal-instruction

why I get illegal hardware instruction message from a simple code?

#include <stdio.h> #include <string.h> int main() { char s1[] = "harry"; char s2[] = "ravi"; char s3[54]; puts(strcat(s1, s2)); strcpy(s3 ,st...
test-img

Deepkr09

c

string

header-files

hardware

illegal-instruction

Votes: 0

Answers: 1

Latest Answer

The problem come from your code having undefined behavior: You call strcat(s1, s2); twice, attempting to copy the characters from s2 at the end of the array pointed to by s1, but s1 already contains a...
test-img

chqrlie

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved