Thank you for the reply. The given thread does explain the reason.
However, how should i implement it in c so i get nan or 1/0 or something expected?
Type: Posts; User: bkd
Thank you for the reply. The given thread does explain the reason.
However, how should i implement it in c so i get nan or 1/0 or something expected?
Hello to all,
I was doing a simple trig problem in c where i ran across this problem. I was expecting NaN since tan(90 in deg or 1.5708 in rad) is 1/0 . But to my surprise i got...
than getche() not showing anything on my monitor is normal?
because previous example with input = getche(); at the place of input= getchar(); is not showing any output on screen.
by the way,...
my bad, The articles did says getche and not getchar. May be i should take breaks more frequently:tongue:.
I read them again and find a line which says that It echo to stdout. Which not...
@laselight
i did write...but sadly its not working according to the description given on those wiki articles.
for example-
#include <stdio.h>
#include <conio.h>
int main()
{
Thanks for replying..
but printing to screen part was meant for getchar, as the line says above in my first post-
getchar - Reads a character directly from the console without buffer, but with...
I know this is a stupid question but i am learning by myself so...here we go.
I was reading about getch and getchar functions and difference between them but failed to understand what echo means...
@std10093
-Wdiv-by-zero
Its suppose to be default, as you mentioned but i gave the command explicitly to compiler and still no success.
I think i should move on to keep up with my...
@oogabooga
its okay!
I just need to know that is it the way gcc compiler behaves?
or
I accidentally made any changes.(because borland did show that error)
only then i could move...
hey, thanks for all the replies guys!
but the post is looking broken. I tried to re-edit it but nothing happens.
sorry about that.
@std10093
thank for reply!
nah! Its just an exercise in 1st chapter of the book that i am reading and the solution code is suppose to generate this error, that's it.
by the way shouldn't be a...
hello to all, :D
I am new to c programming and i have encountered some very frustrating problem.
so i was suppose to write a program that gives a divide error but output is not showing anything...