- Strength to Increase Rep
- +3
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re:
guys, ive copied a code about socket programming just to see how it runs. problem is i cant compile it everytime i compile client.c it shows and error. here is the error [CODE] client.c: In function ‘error’: client.c:9: warning: incompatible implicit declaration of built-in function ‘exit’ client.c: In function ‘main’: … |
|
Re:
I am writing a program that reads from a file that contains a list of appointments and then put them into an dynamic array named day. I am having trouble figuring out what is exactly wrong with my program. It keeps on crashing before it finishes reading the file. I … |
|
Re:
Hello I'm trying to copy a character pointer into another character pointer. I currently have [CODE]static char *my_kstrdup(const char *buf) { char *ptr, *ret; ret = ptr = kmalloc(strlen(buf)); if(ptr = NULL) panic("kmalloc returned NULL"); for(; *buf != '\0'; ++ptr, ++buf) *ptr = *buf; *ptr = '\0'; return ret; }[/CODE] … |
|
Re:
Hi, I'm a beginner of C++ programming. I am trying to write a void funtion for the following question but in vain. Please help me. Here's the question: Suppose we want to display the following figure containing the alphabetic character V on yhe screen: #^^^^^^^^^# ^#^^^^^^^#^ ^^#^^^^^#^^ ^^^#^^^#^^^ ^^^^#^#^^^^ ^^^^^#^^^^^ … |
|
Re:
I'm having trouble figuring out what exactly I'm missing in this Byte reversal method. For example is should take 0x01020304 and flip the bits to 0x04030201. I've attached my output giving the errors and here is my code: [CODE]/* * reverseBytes - reverse the bytes of x * Example: reverseBytes(0x01020304) … |
|
Re:
Hey all. I'm writing a simple bank program with a menu of options, and the first option is to create an account. The user enters an account number and this number is stored in the array in the first empty slot. So for example, if the user enters 100, it … |
|
Re:
I have a data file that, if I was using C++, I would use the getline function to read its data into the proper variables. However, the getline functions that C++ allows appear to not be available to me in C. I want to be able to specify a stream, … |
|
Re:
Hello! I am taking a scientific computing class, where we are doing some programming in C, and right now our assignment is to add commentary to an existing program explaining what every line does (starting at the line that says Start here!). As you can see in the code below, … |
|
Re:
Hello, I am making a program to make a directory in a users Library folder then create a file in it. Whenever I try to make the directory I get an error and if I continue with the program i get a segmentation fault error Here is the source Code … |
|
Re:
hello i was reading today some stuff abt bitfield but here in this program I understand most of it but there unnamed fields inside the structure book says its stuff for allgiment or something like that i dont rlly get what does it do [code] /* fields.c -- define and … |
|
Re:
I'm a noob when it comes to C programming. I wrote a simple program that runs an infinite for loop. But inside that loop I wanted to create another loop to stop the user three times after entering incorrect passwords. I tested from different angles it seems like the infinite … |
|
Re:
can i use statements like: int num; fread(&num,sizeof(num),1,stdin); fwrite(&num,sizeof(num),1,stdout); i tried this and debugged the code the variable is having the correct value. but that is not getting displayed. can't i use stdin , stdout in fread and fwrite. |
|
Re:
This program I wrote has the following error: (33,5):Declaration syntax error (64,2):Declaration missing ; [CODE]#include <stdio.h> #include <conio.h> int range1(int a); int range2(int b); int range3(int c); int range4(int d); int main() { int in, ctr, ctr1=0, ctr2=0, ctr3=0, ctr4=0, ctr5=30; for(ctr=1;ctr<=30;ctr++) { printf("Enter %d integer values within 1-200: ", … |
|
Re:
please do help me the program goes like this; #include<iostream.h> void main() { int x; int no[10]; cout<<"input 10 numbers"<<endl; for(x=0;x<=9;x++) cin>>no[x]; for(x=0;x<=9;x++) cout<<no[x]<<endl; } but i have to get the sum 0f the 10 numbers in ascending order this the outtput example: 1+1=2 2+2=4 3+3=6 5+5=10 4+4=8 i have … |
|
Re:
I wrote this small program for a class im taking, and its supposed to take an int n and a radix (int between 2 and 16) r and give me the number converted to the new base. It only has to go from decimal to other radix's. I run my … |
|
i've copied this code from net but this is not working. Only blank output. can anyone help. i'm new to assembly. [code][ORG 7C00h] ; This is where BIOS put me ; --------------------------------------------------------- ; Main program ; --------------------------------------------------------- mov si, msg ; Print message call putstr hang: jmp hang ; Hang! … |
|
Re:
Hello. I have this simple program that open a file and read lines from it and print them to screen. #include <errno.h> #include <stdlib.h> #include <stdio.h> int main() { char line[4096]; FILE *fp = fopen("/root/Desktop/testfile","r"); if( fp == NULL ) { exit(1); } while(fgets( line, sizeof(line), fp ) != NULL … |
|
Re:
Good day everyone! I would like to ask some problem about the program I am currently working (hangman to be specific). Since I am just a beginner, there are many things I would like to clarify. I would like to ask your help so that I can enable more to … |
|
Re:
[code]#inclxude<conio.h> #include<stdio.h> #include<stdlib.h> max(int a,int b,int c); void main (void) { clrscr(); int a,b,c,max; long z; printf("input three numbers by giving space"); scanf("%d %d %d",&a,&b,&c); z=max(a,b,c); printf("Max value is %lb",z); getch(); } void max(int a ,int b,int c ) { if(a>b&&a>c) return(a); if(b>c&&b>a) return(b); return(c); }[/code] i make that program … |