char int; here int is a keyword cannot be used a variable name.
int long; here long is a keyword cannot be used a variable name.
float double; here double is a keyword cannot be used a variable name.
So, the answer is int length;(Option A).
1 : |
|
2 : |
|
3 : |
|
int i = 35; i = i%5;
short int j = 255; j = j;
long int k = 365L; k = k;
float a = 3.14; a = a%3;
float a = 3.14; a = a%3;
The modulus (%) operator can only be used on integer types. We have to use fmod() function in math.h for float values.
double = 8 bytes.
long double = 10 bytes.
#include<stdio.h>
int main()
{
short int i = 10;
long int j = 10;
printf("short int is %d bytes.,\nlong int is %d bytes.",
sizeof(i),sizeof(j));
return 0;
}
Output:
short int is 2 bytes.
long int is 4 bytes.
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.