- Strength to Increase Rep
- +2
- Strength to Decrease Rep
- -0
- Upvotes Received
- 5
- Posts with Upvotes
- 5
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
hello my question would be if som1 can help out with a better prototype than i have for verifying if input is within ascii alphabetic range what i have now [CODE]int betu (char s[]){ int i, jo=0; for(i=0;i<strlen(s);++i) { if(!isalpha (s[i]) && s[i]!=' ' ) return 0; else ++jo; } … |
|
I'm running ubuntu on x86_32...and I keep getting segmentation fault while running this program. [CODE] #include<stdio.h> #include<stddef.h> char *memcp(char *dest, const char *src, size_t n) { char *dp = dest; const char *sp = src; while(n--) *dp++ = *sp++; return dest; } int main() { char *s = "abcde"; char … |
|
So I got this assignment to combine two arrays without using strcat(). The two arrays must be passed to function as parameters. The arrays need to be merged into one array in the function with dynamic memory allocation and then the new string needs to be returned back to main. … |
|
i wanna ask about this statement... [CODE]int a[] = {0};[/CODE] the value all of a is it equal to 0 ? i mean all of the location of a.. |
|
We have two arrays .merging them is simple.i want to know how can i sort then after that without declaring a single memory after that.... |
|
hey dudes pls help me on this. My program is crashing on the following piece of code When i make 1 recurssive function to work, the program works without crashing. So I would really need help in spotting the mistake I have done. Incase if you want to know what … |
|
Please heLP me in my finAl pRojEct pLLZz,,guyZz!!!All about C program in quincy that reads the year and day of the week of the first day of the year.Then the progrAm prints the calendAr for that year.Allow the user to pause for each month of the year.Note also for the … |
|
What's the difference between return (0); and return 0; |
|
i want to write a program that prints the value in array which are at odd position, i've this for single dimensional array but confused about 2-D array. Single dimensional: [CODE] int main(void) { int num[10]; int i; for (i=0;i<10;i++) { printf ("Enter %d value: ",i); scanf ("%d",&num[i]); } for … |
|
int a; is Definition and Declaration both ? or declaration only ? |
|
I am trying to write a program in C with a main function and five other functions: input, output, calculate day of year for a calendar date, calculate calendar date from day of year and year, and determine if its a leap year function. I have a problem with calendar … |
|
What is the best way way to get numeric input in C? |
|
I'm scanning a file to see if user input matches a word in the txt file.. if it matches.. increase the array size and add the word. This is a 2d array. "max_word_size" is currently just a constant variable. [CODE]void UserMode(char userAnswers[][max_word_size], int *size) { FILE *fid = fopen("dict.txt","r"); char … |
|
Hey everyone, I have this assignment for my C++ class and I need to sort some data I have data in a file in this order: some 10 digit int -the account id some name -the account name some balance -the account balance basically I want to sort the data … |
|
I just learned about linked lists, so i decided to experiment a little. I'm trying to make a linked list that automatically keeps all of the data in consecutive order (like bubble sort built in :P). Anyways, the problem is that while it adds data, the second thing added disappears, … |
|
This is a school assignment and I think it's nearly done, there are probably some parts that need straightening out, but at this point I'm just trying to get my program to compile correctly. The program depends on an input file with sample data as follows: 1000 John 9.5 9.0 … |
|
Here is the program: int i,n; double v_in[20+1],v_out[20+1]; cout << "\ninput n ? "; cin >> n; for(i=1;i<=n;i++) { cout << "input v_in[" << i << "] ? "; cin >> v_in[i]; } // reverse v_in and store the result in v_out for(i=1;i<=n;i++) { v_out[i] = v_in[n-i+1]; } cout << … |
|
Hello, I've been having problems with my program. I really don't get files that much. This is my code: [code=c] #include<stdio.h> #include<string.h> #include<stdlib.h> #include<conio.h> #define max 3 typedef struct { char FName[24]; char LName[16]; char MI; }name; typedef struct { unsigned long ID; name n; char course[8]; int level; }profile; … |
|
I am trying to figure out why my function isn't working when I compile the program....can anyone suggest anything? [code] #include <iostream> #include <cmath> using namespace std; double distance(); void main() { double center1, center2, point1, point2; cout << "Please Enter X-Value of Center: "; cin >> center1; cout << … |