Programming In C Practical 4

Question 1
Write the output of the following program.
program1.cpp
C
				#include<stdio.h>
#include<conio.h>
void main()
{
	int m=4;
	float n=m+4.7;
	printf("%f\n",n);
	printf("%d\n",n);
	getch();
}
			
Output
Question 2
Write the output of the following program.
program2.cpp
C
				#include<stdio.h>
#include<conio.h>
void main()
{
	float m=4.5;
	int n=m+4;
	printf("%f\n",m);
	printf("%d\n",n);
	getch();
}
			
Output

Leave a Comment

Your email address will not be published. Required fields are marked *