To get latest updates

Bookmark This Site

Friday, 11 November 2016

69.C Program to Write a Sentence to a File

C Program to Write a Sentence to a File

In this example, you'll learn to write a sentence to a file using fprintf() statement.
To understand this example, you should have the knowledge of following C programming topics:
  • C Programming Files I/O
  • C Standard Library Functions


68.C Program to Store Information Using Structures with Dynamically Memory Allocation

C Program to Store Information Using Structures with Dynamically Memory Allocation

In this example, you'll learn to store information using structures by allocation dynamic memory using malloc().
To understand this example, you should have the knowledge of following C programming topics:
  • C Programming Pointers
  • C Dynamic Memory Allocation
  • C Programming Structure


67.C Program to Store Information of Students Using Structure

C Program to Store Information of Students Using Structure

This program stores the information (name, roll and marks) of 10 students using structures.
To understand this example, you should have the knowledge of following C programming topics:
  • C Programming Arrays
  • C Programming Structure


Thursday, 27 October 2016

66.C Program to Calculate Difference Between Two Time Periods

C Program to Calculate Difference Between Two Time Periods

In this example, you'll learn to calculate the difference between two time periods using user defined - differenceBetweenTimePeriod function.
To understand this example, you should have the knowledge of following C programming topics:
  • C Programming User-defined functions
  • C Programming Structure
  • How to pass structure to a function in C programming?
  • C Programming Structure and Pointer


65.C Program to Add Two Complex Numbers by Passing Structure to a Function

C Program to Add Two Complex Numbers by Passing Structure to a Function

This program takes two complex numbers as structures and adds them with the use of functions.
To understand this example, you should have the knowledge of following C programming topics:
  • C Programming Structure
  • How to pass structure to a function in C programming?


64.C Program to Add Two Distances (in inch-feet) System Using Structures

C Program to Add Two Distances (in inch-feet) System Using Structures

This program takes two distances (in inch-feet system), adds them and displays the result on the screen.
To understand this example, you should have the knowledge of following C programming topics:
  • C Programming Structure

Example: Program to add two distances in inch-feet system

63.C Program to Store Information(name, roll and marks) of a Student Using Structure

C Program to Store Information(name, roll and marks) of a Student Using Structure

This program stores the information (name, roll and marks) of a student and displays it on the screen using structures.
To understand this example, you should have the knowledge of following C programming topics:
  • C Programming Structure