A c program contains the following declarations and initial assignments: int i=8,j=5; float x=0.005,y=-0.01; char c=’c’,d=’d’; Determine the value of each of the following expressions. Use the values initially assigned to the variables for each expression (c) (i-3*j)%(c+2*d)/(x-y)

Posted: September 17, 2012 in CSE Sem1, ECE Sem1, Lab 10B, Lab 10B
#include<stdio.h>
int main()
{
int i=8,j=5;
float x=0.005,y=-0.01,k;
char c='c',d='d';
	k=((i-3*j)%(c+2*d))/(x-y);
	printf("%f",k);
	return 0;
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s