i need help with thees quastions on C programing If int n1

i need help with thees quastions on C programing

If int n1 = 5, and int d1 = 2, what are the results of the following operations? (assume double frac) frac = (double)n1/(double)d1; frac = (double)n1/d1 + 3.5; frac = (double)(n1/d1) + 2.5; What\'s wrong, if anything, with the following function call: scanf(%d, first); Show which of the following are valid and which are invalid identifiers: Why? run_1 2run double Char double - trouble two*four

Solution

Problem 1:

frac = (double)n1/(double)d1;

2.5

frac = (double)n1/d1 + 3.5;

6

frac = (double)(n1/d1) +2.5;

4.5

problem 2:

scanf(\"%d\",&first);

Problem 3:

In C language identifiers are the names given to variables, constants, functions and user-define data.

run_1, 2run, Char is not a keyword and they follow the rule of identifiers so there are identifiers

double are keyword so they are not used as identifiers

double-trouble, two*four has -,* as special character so not a identifiers

i need help with thees quastions on C programing If int n1 = 5, and int d1 = 2, what are the results of the following operations? (assume double frac) frac = (d

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site