Write a character literal representing the (upper case) letter a.

2. Write a personality literal representing acomma. 3. create a character literal representing the digit – 4. Declare a character variable called c. 5. Calculate the common (as a double) associated with valuescontained
within the integer variables num1, num2, num3 and assign thataverage to
the dual adjustable avg.    Believe the factors num1, num2, and num3
havebeen declared and allocated values, as well as the adjustable
avgdeclared. 6. Provided two integer factors length and rate , compose an
appearance that divides length by rate utilizing floating-point
arithmetic, in other words. a fractionalresult must be created. 7. offered an integer adjustable drivingAge which has had alreadybeen
declared, compose a declaration that assigns the worth 17 to drivingAge
. 8. offered two integer factors oldRecord and newRecord , compose
a declaration that provides newRecord thesame price that oldRecord
features. 9. offered two integer factors matricAge and gradAge , compose a
declaration that provides gradAge a valuethat is 4 significantly more than the worth
of matricAge. 10. Provided an integer adjustable bridgePlayers , compose astatement
that escalates the worth of that adjustable by 4. 11. Provided an integer adjustable earnings , compose astatement that
escalates the worth of that adjustable by one factor of 10 . 12. offered two int factors, i and j , whichhave already been announced
and initialized, as well as 2 various other intvariables, itemp and jtemp ,
which were announced,write some signal that swaps the values in i
and j bycopying their particular values to itemp and jtemp correspondingly,and
after that copying itemp and jtemp to j and irespectively. 13. Provided three currently declared int factors, i , j , and
temp , compose some signal that swaps thevalues in i and j . Utilize temp
to put on the worth of i and designate j ‘s price to i . The
originalvalue of i , that was conserved in temp , are now able to beassigned
to j . 14. Provided two int factors, firstPlaceWinnerand
secondPlaceWinner , compose some signal that swaps theirvalues. Declare
any extra factors as required.

1. create a personality literal representing the (upper situation)letter
A .
‘A’
2. create a personality literal representing acomma.
‘,’
3. create a personality literal representing the digit –
‘1’
4. Declare a personality variable called c.
char c;
5. determine the common (as a two fold) associated with valuescontained in
the integer variables num1, num2, num3 and assign thataverage to
the dual adjustable avg.
   Believe the factors num1, num2, and num3 havebeen
announced and assigned values, as well as the adjustable avgdeclared.
avg=(dual)(num1+num2+num3) /3.0 ;
6. offered two integer factors length and rate , compose an
appearance that divides length by rate utilizing floating-point
arithmetic, in other words. a fractionalresult must be created.
(float) length /(float) rate;
7. offered an integer adjustable drivingAge which has had alreadybeen
declared, compose a declaration that assigns the worth 17 to drivingAge
.
drivingAge=17;
8. offered two integer factors oldRecord and newRecord , compose a
declaration that provides newRecord thesame price that oldRecord
features.
newRecord=oldRecord;
9. offered two integer factors matricAge and gradAge , compose a
declaration that provides gradAge a valuethat is 4 significantly more than the worth
of matricAge.
gradeAge=matricAge+4;
10. offered an integer adjustable bridgePlayers , compose astatement
that escalates the worth of that adjustable by 4.
bridgePlayers=bridgePlayers+4;
11. Provided an integer adjustable earnings , compose astatement that
escalates the worth of that adjustable by one factor of 10 .
profits=profits *10
12. offered two int factors, i and j , whichhave already been announced
and initialized, as well as 2 various other intvariables, itemp and jtemp ,
which were announced,write some signal that swaps the values in i
and j bycopying their particular values to itemp and jtemp correspondingly,and
after that copying itemp and jtemp to j and irespectively.
itemp=i;
jtemp=j;
i=jtemp;
j=itemp;
13. Provided three currently declared int factors, i , j , and temp
, compose some signal that swaps thevalues in i and j . Utilize temp to
contain the worth of i and designate j ‘s price to i . The
originalvalue of i , that was conserved in temp , are now able to beassigned
to j .
temp=i;
i=j;
j=temp;
14. offered two int factors, firstPlaceWinnerand
secondPlaceWinner , compose some signal that swaps theirvalues. Declare
any extra factors as required.
int temp;
temp=firstPlaceWinner;
firstPlaceWinner=secondPlaceWinner;
secondPlaceWinner=temp;

Leave a Comment