1)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. (a) (3*i-2*j))+(i%2*d-c)

Posted: September 17, 2012 in CSE Sem1, ECE Sem1, Lab 10B, Lab 10B
#include<stdio.h>
int main()
{
int i=8,j=5,k;
char c='c',d='d';
	k=((3*i-2*j)+(i%2*d-c));
	printf("%d",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