Day 5 : Assaignment for All // Write a programm for below questions.


Assaignment on variables and data types in c lang

This post discusses assignments for all of u on the basic of c programming. 

in the first question, we are accepting input value from the user and showing that value on our terminal.

Learn Previous Chapter: 

Day-1: What is programming and Basics of c programming.Day 2: Structure of c and Input, Output in c programming.Day 3: Variable and Data types in the C language.

1./* WAP to input a person's age and Display the value */ Write 5 programs like this with float, int, char & string values;

Assaignment 1


#include <stdio.h>


int main(){

int age;

printf("Enter our Age: ");


printf("THis is your age: %d",age);



2. /* WAP to display the min and max value for the datatype */


 Hints --> Add limits.h & float.h header file in your code.

<climits>(limits.h) defines sizes of integral types. 

This header defines constants with the limits of fundamental integral types for the specific system and compiler implementation.

The limits for fundamental floating-point types are defined in <cfloat> (<float.h>). 

The limits for width-specific integral types and other typedef types are defined in <cstdint> (<stdint.h>).

use this for reference: -

Example: - 

printf("Minimum Value Of character is: %d" , INT_MIN);

Post a Comment

Previous Post Next Post