I thought using %d the compiler will convert 65.0 to 65 which is an integer right? But why the value turn out to be 0? I still dun understand?
Let's say if I use exit(1) if program exit normally...
Type: Posts; User: jnwk888hwq
I thought using %d the compiler will convert 65.0 to 65 which is an integer right? But why the value turn out to be 0? I still dun understand?
Let's say if I use exit(1) if program exit normally...
What's the difference b/w exit(1) and exit(0)? When do we use them?
Yup, I know. I want to know why using %d will cause value to be 0 and not 65?
#include <stdio.h>
int main(void)
{
float b;
b = 65.0;
printf("The value of b is %d\n", b);
return 0;
}
OUTPUT: The value of b is 0.
How to use this function header? I never use b4 but see b4?
Need to confirm.
Does float has 8 bytes in a 32 bit machine?
That means:
char - 1 byte
int - 4 bytes
float - 8 bytes
double - 16 bytes
Oh I think I know whta you are trying to say. 10 bytes right? But why do we add the size of char?
But I need your confirmation for this:
char *pointers = "Toh Chin";
My lecture notes put 9...
I dun quite get what you mean? Can you tell me if it is 10 or 6 bytes?
char *string2 ="HELLO";
What is the reservatin of memory required for initialisation for the above declaration??
Lecturer said 10 bytes, tutor says 6 bytes while lecture notes has
one similar...
Then how should I calculate area? I can't think of any formula. Please help.
Anyway, my friends managed to get the program BUT still got one problems - area always becomes zero. How to overcome it?
#include <stdio.h>
#include <math.h>
int main(void)
{
void...
But when I post problems nobody want to help. They only ask to try and try. BUT I DID TRY AND TRY. yet can't get the results. My probrlems is posted in Disk IP/OP.
Thanks.
I really dun know. I know 1/2 x base x height but what about this?
Can someone please help?
Also, aint the program too long. I know shorter program do exist. How to shorten this program?
I did try. However, I manage to get the program done a moment ago. But I dun know how to find the area. Can any one help? Also, is my step too long? Is there any shortest methods? This question is...
I did try. However, I manage to get the program done a moment ago. But I dun know how to find the area. Can any one help? Also, is my step too long? Is there any shortest methods? This question is...
Help........! I think writing a program that read and write datas from a file and onto another file is quite complicated. I dun know what to do. Can anyone please explain the following:
write a c...