Can Anyone see whats worng with any of the three following pieces of code thanks
1.
Code:
void Display_Result(char dat)
{
printf("the result is %X\n");
}
The parameter dat containing 'A' is passed to the function Display_Result and the printf rfunction produces 12FF80
2.
Code:
#include <stdio.h>
void main(void)
{
printf("e=%f\n",exp(1));
}
When executed this programme produces e = 0.000000 instead of e= 2.718282
3.
Code:
#include <stdio.h>
vois main (void
{
char input;
printf ("Press a key: ");
scanf("%c, input;
printf("You pressed:%c\n",input);
}
When executed under windows XP, this programme causes a Misrosoft dialog box to open and report ....
test1.exe has encountered a problem and needs to close. We are sorry for the inconvenience.
It the invites you to debug the prgramme or send an Error Report.
Thanks a mill for your help, this is an answer im looking for for exams, please help,
P.S i know some of it maybe in the wrong section but i wanted to keep it altogether.