write a program for size of a data type without using
sizeof() operator?
Answer Posted / akash patil
#include<stdio.h>
#include<conio.h>
void main()
{
int a[2];
printf("size is %d",(int)&a[1]-(int)&a[0]);
getch();
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
What does %c mean in c?
What are high level languages like C and FORTRAN also known as?
What is file in c preprocessor?
what will be the output for the following main() { printf("hi" "hello"); }
How to write a code for implementing my own printf() and
scanf().... Please hep me in this... I need a guidance...
Can you give an coding for c... Please also explain about
the header files used other than #include
What is the meaning of ?
What is structure padding in c?
What is calloc() function?
The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.
How do you initialize pointer variables?
What is the difference between struct and typedef struct in c?
How can I find out the size of a file, prior to reading it in?
What are disadvantages of C language.
How to write c functions that modify head pointer of a linked list?