Programming, C, Interview, Programming Languages, Software Development.
the structure? void store_data (int len, char *str) { struct data *ps; } So you do two allocations here. One allocation for the pointer ps and other allocation for ps->str (of size len). Here comes the question. Can you design a data structure where you can store the same data with a single