Skip to content

Tag Archives: cpp-structure

In C++, struct and class are exactly the same things, except for that struct defaults to public visibility and class defaults to private visibility. Some important… Read More
Consider the below C++ program. Is it right way of returning array from a function?  C #include <stdio.h>   int* fun() {     int arr[100];  … Read More
Prerequisite : Structures in CName and marks in different subjects (physics, chemistry and maths) are given for all students. The task is to compute total… Read More
Most of the log files produced in system are either in binary(0,1) or hex(0x) formats. Sometimes you might need to map this data into readable… Read More
In C, we can specify size (in bits) of structure and union members. The idea is to use memory efficiently when we know that the… Read More
Like Structures, union is a user defined data type. In union, all members share the same memory location. For example in the following C program,… Read More
What is a structure? A structure is a user defined data type in C/C++. A structure creates a data type that can be used to… Read More
What will be the size of following structure?  CPP struct employee {     int     emp_id;     int     name_len;     char    name[0]; }; 4 + 4 + 0 =… Read More