Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
C C Basics C-Struct-Union-Enum

Structures in C

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 group items of possibly different types i...
Articles C C-Struct-Union-Enum

Structure Member Alignment, Padding and Data Packing

What do we mean by data alignment, structure packing and padding? Predict the output of following program. #include <stdio.h>    // Alignmen...
C C-Structure & Union C

Anonymous Union and Structure in C

In C11 standard of C, anonymous Unions and structures were added. Anonymous unions/structures are also known as unnamed unions/structures as they don’t have ...
Arrays C C++

Structure Sorting (By Multiple Rules) in C++

Prerequisite : Structures in C Name and marks in different subjects (physics, chemistry and maths) are given for all students. The task is to compute total marks and ...
C C-Struct-Union-Enum C-Structure & Union

Flexible Array Members in a structure in C

Flexible Array Member(FAM) is a feature introduced in the C99 standard of the C programming language. For the structures in C programming language from C99 standard ...
C C-Structure & Union C

Read/Write structure to a file in C

Prerequisite: Structure in C For writing in file, it is easy to write string or int to file using fprintf and putc, but you might have faced difficulty when writing...
C Difference Between C

Difference between Structure and Union in C

structures in C A structure is a user-defined data type available in C that allows to combining data items of different kinds. Structures are used to represent a rec...
Arrays Linked List Stack

Stack Data Structure (Introduction and Program)

Stack is a linear data structure which follows a particular order in which the operations are performed. The order may be LIFO(Last In First Out) or FILO(First In Las...
C C++ Difference Between

Difference between C structures and C++ structures

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 di...
C++ Difference Between CPP

Structure vs class in C++

In C++, a structure is the same as a class except for a few differences. The most important of them is security. A Structure is not secure and cannot hide its impleme...

Subscribe to Our Newsletter