- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re:
how can i replace the array notation with pointer notation #include<stdio.h> #include<stdlib.h> #include <math.h> /* 4 */ void run_sieve(char *, int); /* 5 */ void print_primes(char *, int); /* 6 */ int main() { /* 7 */ int i, top; /* 8 */ printf("compute primes up to: "); /* 9 … |
|
Re:
I am making a program to store all the powers of 2(1,2,4,8...) till 2 ^50000. Although I am getting the answer,I am not getting my answer in the required time limit. Any suggestions? How should I store the numbers? Here is my stupid code as of now [CODE] #include<stdio.h> #include<math.h> … |
|
Re:
I just have a quick question. Say I have a struct for the purpose of commenting in which it could be filled up or left blank depending on the user. Therefore, I need to dynamically allocate memory to the array comments. [CODE] typedef struct userComments { char comments; } name; … |
|
Re:
hello all! i need help regarding my C programming homework of the Conway's game of life. i have to make a C program that will read a textfile containing a 25x25 matrix of 'X' or 'blank space' and will print its content. This will serve as the initial generation and … |
|
Re:
[CODE]#include <stdio.h> #include <string.h> #include <stdlib.h> int main(){ char name[80]; char *searchptr; int i, t; for(i=1; name[i]!=EOF; i++){ printf( "Enter name\n"); scanf("%s", &name[i]); } for(t=i; t<=0; t--){ printf(" name[%d] == %s", i, name[t]); getch(); return 0; }}[/CODE] |
|
Re:
i hove a problem about hot to write a program to determine if a number entered by a user is a prime number. Program Input is : Prompt user for a number between 1 and 1000. the probable Program Output is: Echo the user input, display whether the number is … |
|
Re:
Hi, I'm trying to define a dynamic array that consists of an email address and a home address. How can I define them dynamically using malloc() in the below struct? [CODE] typedef struct entry{ char name[40]; /* contains name */ char phone_number[9]; /* contains phone number */ struct entry *next … |