code : -#include<stdio.h>#include<string.h>int main(){char str1 [] = "best"; char str2 [] = "bus"; printf("%s", strcat(str1, str2)); return 0;}In terminal -$ gcc strcat1.c -o strcat (without any errors)$ ./strcatoutput : -*** stack smashing detected ***: terminatedAborted (core dumped)
As explained by Ashiwini, Why did the strcmp results come as 1, 0? Will it be different for each case? Is it like true or false? Can you please elaborate on how the strcmp function works?
1192 visits
Outline:string Libraryഫങ്ഷനുകള് എന്താണ് string Libraryഫങ്ഷനുകള് പല തരത്തിലുള്ള string library ഫങ്ഷനുകള് -strcpy -strlen -strcmp -strcat
string Libraryഫങ്ഷനുകള് എന്താണ് string Libraryഫങ്ഷനുകള് പല തരത്തിലുള്ള string library ഫങ്ഷനുകള് -strcpy -strlen -strcmp -strcat
Show video info
Pre-requisite