http://www.borland.com/borlandcpp/cppcomp/tasmfact.html
Type: Posts; User: Mangesh
http://www.borland.com/borlandcpp/cppcomp/tasmfact.html
Dear Satish_Ram,
Please let us know which operating systema nd which complier you are using. If you using Unix and standard compiler, you can create library file with : cc -c <progname>.c
This...
Dear biosx,
Shibz' first sentence :
>I am new to learning C and was wondering how I can print out the following results using nested if's and only using (1) printf:
I wrote this code to...
Hello,
The code sent by me has a small correction in function foobar()
void foobar (struct foo *barf, int elements)
{
int i;
for(i=0; i<elements; i++) {
...
struct foo {
int x;
char bar[20];
};
void foobar (struct foo *barf, int elements) {
int i;
for(i=0; i<elements; i++) {
(&barf[i])->x = 1;
strcpy(barf[i]->bar, "FooBar") ;
Dear yukon,
There is problem with your code. You are accessing array[9] element, which is not into existance. You created an array of size 9, then it's from array[0] - array[8]. The element...
main()
{
int i=1,j=0;
while(1)
{
if (j==3)
{
i++;
if (i==4)
#include <stdio.h>
/* define year to 365 days and month to 30 days */
#define YEAR 365
#define MONTH_DAYS 30
/* prototypes */
void enter_data(int *, int *, int *);
void...
Dear friends,
I have tried to fit the code as per expected. Explanatin is also given at each step. I would love to solve the upcoming queries.
Thanks and regards,
Mangesh.
#include...
I agree with novacain. One point is missing in his clarification. Pointers are needed to access those veriables in functions
(enter_date(...)). This requires variables to be passed by address...
Dear Sebastiani,
time_elapsed(...) function doesn't have first three parameters as pointers and not need of these parameters as pointers, only last 2 parameters should be pointers.
Regards,...
Dear Sbellaw
I suppose you are not yet satisfied. If I am correct please revert. I have confidence that you will be 100% satisfied. ARRAY DOESN'T COME INTO PICTURE. Please don't get confused. ...
This is the recursive function to convert decimal to binary.
long bin_conv(int nNum)
{
int nRem;
long nAns=0;
if (nNum == 0)
return 0;
nRem=nNum%2;
nNum=nNum/2;
Sorry, I forgot to attend the second query.
>> Now if you're only entering in months, days, years, how would you know the exact hour??? And how come three integers and 2 pointers passed???
If...
Use of pointers in extremely important in your code. If you check the function enter_data(...), the values of year, month and day are being altered. We need the altered values in time_elapsed(...)...
Dear Salem,
Thanx a ton...!!! The site not only gives about make file, but improved my organisation style.
-Mangesh.
Dear Alvin,
The C library function to copy files in Unix in not available.
Regards,
Mangesh.
I want to know the links to find out how to write make file for compiling the 'C' code under Unix. I'll be well served with some sample makefiles...Regards.