w3resource logo


C Programming Exercises

C Exercises: Print your name, date of birth, and mobile number

Secondary Nav

C Basic Declarations and Expressions : Exercise-1 with Solution

Write a C program to print your name, date of birth. and mobile number.

Expected Output :
Name : Alexandra Abramov
DOB : July 14, 1975
Mobile : 99-9999999999

C Code:

#include <stdio.h> 
 int main()  
  {
     printf("Name   : Alexandra Abramov\n"); 
     printf("DOB    : July 14, 1975\n"); 
     printf("Mobile : 99-9999999999\n"); 
     return(0); 
  } 

Solution

#include <stdio.h> 
 int main()  
  {
     printf("Name   : Alexandra Abramov\n"); 
     printf("DOB    : July 14, 1975\n"); 
     printf("Mobile : 99-9999999999\n"); 
     return(0); 
  }

Improve this sample solution and post your code through Disqus.



Join our Question Answer community to learn and share your programming knowledge.

Solve these problems:

Java: How to convert a string to an integer in Java?

C#: Loops in c#

SQL: JOIN using more than 5 tables