Can U write a C-program to print the size of a data type
without using the sizeof() operator? Explain how it works
inside ?
Answer Posted / saikat
#include <stdio.h>
int main()
{
float a[2];
int size = (char*)&a[1] - (char*)&a[0];
printf("%d
",size);
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
write an algorithm to display a square matrix.
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler
Describe the header file and its usage in c programming?
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given
What is register variable in c language?
What does *p++ do?
Find MAXIMUM of three distinct integers using a single C statement
Explain what is the use of a semicolon (;) at the end of every program statement?
What is structure padding and packing in c?
What oops means?
What are the types of data files?
How do you determine a file’s attributes?
Write a program to identify if a given binary tree is balanced or not.
Write a program to check whether a number is prime or not using c?