how to find the size of the data type like int,float
without using the sizeof operator?
Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
int ptr,a[2];
char ptr1,b[2];
float ptr2,c[2];
ptr=(a+1)-a;
ptr1=(b+1)-b;
ptr2=(c+1)-c;
printf("int : %d\n",ptr);
printf("char : %d\n",ptr1);
printf('float : %d\n",ptr2);
getch();
}
than ku
Is This Answer Correct ? | 0 Yes | 8 No |
Post New Answer View All Answers
illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question
Explain how can I right-justify a string?
What is difference between array and pointer in c?
What does the error 'Null Pointer Assignment' mean and what causes this error?
What is c definition?
Explain enumerated types in c language?
write an interactive C program that will encode or decode a line of text.To encode a line of text,proceed as follows. 1.convert each character,including blank spaces,to its ASCII equivalent. 2.Generate a positive random integer.add this integer to the ASCII equivalent of each character.The same random integer will be used for the entire line of text. 3.Suppose that N1 represents the lowest permissible value in the ASCII code,and N2 represents the highest permissible value.If the number obtained in step 2 above(i.e.,the original ASCII equivalent plus the random integer)exceeds N2,then subtract the largest possible multiple of N2 from this number,and add the remainder to N1.Hence the encoded number will always fall between N1 and N2,and will therefore always represent some ASCII character. 4.Dislay the characters that correspond to the encoded ASCII values. The procedure is reversed when decoding a line of text.Be certain,however,that the same random number is used in decodingas was used in encoding.
Differentiate between Macro and ordinary definition.
Write the test cases for checking a variable having value in range -10.0 to +10.0?
Explain the properties of union.
how to find binary of number?
What is data type long in c?
How do we print only part of a string in c?
How can I use a preprocessorif expression to ?
if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.