73 Posted Topics

Member Avatar for PhoenixInsilico

scanf_s is some kind of secure version of scanf... its available in msdn...

Member Avatar for ahamed101
0
76
Member Avatar for rugs267

Strings are passed by reference by default... atoi-> Like salem said error handling is bit tough... sscanf-> is what i would have used, it would separate as well as convert it to int format(or what ever format)... strtol->Parses the C string str interpreting its content as an integral number of …

Member Avatar for rugs267
0
110
Member Avatar for anny**

Hi, There are standard functions for all the ones you have said above... check out math.h... What kind of idea are you expecting anyways?... For add, you need to have atleast 2 numbers... take number 1, take number 2, add them... thats all... Be specific about what you want...

Member Avatar for ahamed101
0
178
Member Avatar for slow14

Hi, Please be more specific... First of all, use code tags when you put up the code... Secondly, whats the actual issue?... Did you mean it runs only once even if you select Sign Up? or is it taking only Username and Password? Tips : Clear the input buffer before …

Member Avatar for ahamed101
0
157
Member Avatar for dhingra

Nope this loop doesn't go to infinity... For positive and negative value of both i and j, it will not even enter the loop... if either i or j is negative, it will enter the loop once... thats it...

Member Avatar for ahamed101
0
111
Member Avatar for Demonisya
Member Avatar for jared_masc

Hi, Its all done wrong, have given the comments inside... [code=c] #include <stdio.h> /*Include the standard I/0 header file */ #include <string.h> /*Include the standard I/0 header file string library */ //The functions that are meant to be defined char* toPLString(char * inputstring); int getInputBygetChar(char input[]); int getInputByfgets(char input[]); int …

Member Avatar for stilllearning
0
247
Member Avatar for En-Motion

[QUOTE=Salem;707712]Here's another redirection [url]http://cboard.cprogramming.com/showthread.php?t=107852[/url][/QUOTE] That Rocked!!!

Member Avatar for ahamed101
0
298
Member Avatar for tondet2

Hi, Please be more specific... What is it that you are looking for? If you want the program to prompt the user to enter the Standing charger and Rate per unit, then you can do it just the way you are taking previous and present readings.

Member Avatar for ahamed101
0
90
Member Avatar for ahamed101

Hi Everyone, I know conio.h is not available in Unix. I want to use getch(). Using curses.h needs causes the screen to clear which I don't want. I found a code snippet (source : internet) using termios, it works, the thing is I need to press enter/or any other key …

Member Avatar for ahamed101
0
1K
Member Avatar for J-son

Hi there, [code] for (i=0;i<=2;i++){ fflush(stdin); scanf("%d %c %c %c %d",&d2[i].roll,&d2[i].name,&d2[i].dep,&d2[i].course,&d2[i].year); } [/code] Just add fflush(stdin) inside the for loop... this will solve your problem... To remember : Always use fflush(stdin) before scanf() cause if not done, the input which you have given will remain in the input stream and …

Member Avatar for abhijeetcn
0
148
Member Avatar for ahamed101

Hi All, Is there any way to invoke an Window Application (for eg say calc.exe) from a Unix Server. I think we might be needing a Windows X Server running. I am not sure how to invoke an application from the unix server. Any help on this. Regards, Ahamed.

Member Avatar for BillBrown
0
206
Member Avatar for aoi

Hi there, Please try to be more specific about your queries... Looks like this is a doubly linked list... a queue?... Like Sci@phy said, if h is a pointer to first node, you should use [code] if(h == NULL) [/code] or if it is an argument you have passed to …

Member Avatar for ahamed101
0
109
Member Avatar for rrreeefff

Here it is... [code] #include "stdio.h" #include "conio.h" int fact (int n); // function prototype// int main (void) { int n,result; printf("please enter a positive integer"); scanf("%d", &n); result = fact(n); printf("The answer is %d\n", result); getch(); return 0; } int fact (int n) { if (n<=1) return 1; else …

Member Avatar for ahamed101
0
160
Member Avatar for asifjavaid

Hi, If its ok the character is echoed on the screen, you can very well go for getc(stdin) or getchar() in a while loop with the termminating condition like carriage return or something you want...

Member Avatar for ssharish2005
0
2K
Member Avatar for rrreeefff

Hi there, Other than the syntax error, there is no issue with the logic... Below I am pasting the correct code with a print statement... [code] #include "conio.h" #include "stdio.h" int fib (int n); // function prototype// int main (void) { int num, result; printf ("Please enter a positive integer\n"); …

Member Avatar for rrreeefff
0
101
Member Avatar for Strat79

Hi, I am not able to run the program in Windows using Eclipse, it give me error... To get more info on core file, comile your sources with -g option like cc P3.c -c -g P3.o and then when the core is generated run the command gdb a.out core It …

Member Avatar for ahamed101
0
238
Member Avatar for ahamed101

Hi everyone, Need a small help. I need to read the data from stdin (standard input) without hitting enter. Need to read the data as in and when they are typed in until EOF (CTRL + D as I am using UNIX) is encountered. I tried, getc() - requires ENTER …

Member Avatar for ahamed101
0
491
Member Avatar for zabr

conio.h is not supported in Unix C. Are you using Unix C? You must be using conio.h probably for getch() I guess, if so you may use getchar().

Member Avatar for Aia
0
127
Member Avatar for vijaysoft1

Guys guys... this ain't a homework solving forum... come on... are you stuck with some coding part?, then we will help you, gladly... but don;t expect us to do your homework... the algorithm you need to solve your problem is given by Salem... so please... put in some effort...

Member Avatar for vijaysoft1
0
358
Member Avatar for madankumar
Member Avatar for pauljahill

hey, you are missing a semi-colon in [code] if (*ptr == ' ') spaces++; [/code] Hope it will work now.

Member Avatar for Major Major
0
122
Member Avatar for file sharer

You learn C, you will master 70% of programming languages. I have attached a C tutorial pdf for getting started. Hope it will be helpful. I strongly recommend to try out the programs and not just reading through. You may download Dev-cpp from bloodshed.net for an C IDE. All the …

Member Avatar for Ancient Dragon
0
120

The End.