Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: andrew23
  • Order by date
  1. andrew23

    Need the function of strcat using pointers??

    void main () { int i = 0; char a[50], b[25]; printf ("Enter first string>"); while ((a[i++] = getchar() )!= '\n'); printf ("Enter first string>"); gets(b); for (int j = 0; b[j] != '\0'; j++, a[i+j] = b[j]); a[i + j] = '\0'; printf ("a + b =...
  2. andrew23

    two dimensional array

    hi, I think this should work find; void main () { int arr[4][5], row = 4, col = 5; .... print_array (arr, row, col); } void print_array(int arr[][5], int row, int col) { for (int x = 0; x < row; x++){ for (int y = 0; y < col; y++) printf (&quot;%d &quot;, arr[x][y])...
  3. andrew23

    PASSING AN ARRAY OF POINTERS

    The last line should be: printf(&quot;The filename is: %s\n&quot;, zipFileNames[userPrintAnswer]); Andrew Lim Trying and exploring is adventuring
  4. andrew23

    String

    you may use char * as the data type for passing in returning a string, example: char* func (char * a) { char b[5] = &quot;halo&quot;; //codes are here return b; } Andrew Lim Trying and exploring is adventuring
  5. andrew23

    Reverse string

    /*Duplicate the new string*/ char* duplicate(char text[]) { char text2[50]; strcpy (text2, text); return strcat(text2,text); } char text2[100]; strcpy (text2, duplicate(text)); printf(&quot;\tThe duplicated string is: %s.\n&quot;, text2); x-)I don't really get what you mean...
  6. andrew23

    CFSET with or without a name

    It's somehow like printf (&quot;%d&quot;, temp = a + b); and printf (&quot;%d&quot;, a + b);

Part and Inventory Search

Back
Top