#include <stdio.h> #include <string.h> #include <conio.h> typedef struct { char name[10]; int age; }detailsStruct; static int fnProcess(detailsStruct** detailsPtrPtr) { detailsStruct detailsStr; strcpy_s(detailsStr.name,"Arjun"); detailsStr.age = 25; *detailsPtrPtr = &detailsStr; return 0; } int main() { int rv = 0; detailsStruct* detailsPtr; rv= fnProcess(&detailsPtr); printf("\n Name %s", detailsPtr->name); printf("\n Age %d", detailsPtr->age); _getch(); return rv; }
Name Arju£²▲ Age 221459990
strcpy_s()
detailsStr
fnProcess()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)