No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
5 Posted Topics
Hi. This is NOT a homework assignment (self-interest only). The exercise asks me to write a function which accepts two strings and returns a pointer to the longer of the two. [code language="C"] #include <stdio.h> #include <stdlib.h> char* longer( char str1[], char str2[] ); char* str_ptr; int main( void ) … | |
Hi. I recently read that using the name of an array without brackets was one method for accessing the <address> of the array's first element. E.g: [code=c] #include <stdio.h> int arr[5] = { 2, 4, 6, 8, 10 }; int main( void ) { printf( "The address of the '2' … | |
Hi. The objective os to open a file and print 55 lines of content at a time. Since I am still learning 'C', my code (thus far) may appear slightly neophytic ;) [CODE=C] #include <stdio.h> #include <stdlib.h> #define SIZE 1000 void pause( void ); int main( void ) { FILE* … | |
Hi. The objective is to sort an array of doubles. My effort is listed below: [CODE=C] #include <stdio.h> #define MAX 10 void sort( double* n[], int q ); void print_nums( double* n[], int q ); int main( void ) { double* nums[MAX]; int i; for( i = 0; i < … | |
Hi. Objective: Write a program that declares a 12*12 array of characters. Place Xs in every other element. Use a pointer to the array to print the values to the screen in a grid format. Listed below is my non-functional attempt. Any help would be most appreciated. Thanks, Molly [CODE=C] … |
The End.