• Skip to main content
  • Skip to footer

CS50's Introduction to Computer Science on Edx: Supplementary resource

CS50 threads to aide as a supplementary resource

To create a new array equal to argv[1][ ] for the temporary storage of values in order to compare the uniqueness of keys

CS50 threads to aide as a supplementary resource › Forums › CS50’s Introduction to Computer Science by Harvard University on Edx › Week 2 › To create a new array equal to argv[1][ ] for the temporary storage of values in order to compare the uniqueness of keys

Tagged: arrays

  • This topic is empty.
Log In Register Lost Password
Viewing 1 post (of 1 total)
  • Author
    Posts
  • February 26, 2022 at 4:27 am #246
    admin
    Keymaster

      My goal is to create a new array named char temp_array[t] that will be equal to argv[1][ ]. Is it possible? What should I place in the second square bracket of argv[1][ ]. Following is the code I have written:


      Copy Code
      Copied
      Use a different Browser

      
      
      char temp_array[t] = argv[1][];
          for (int i = 0; i < 25; i++)
          {
              for (int j = i; j < 25; j++)
              {
                  temp_array[t] = toupper(temp_array[t]);
                  printf("capital%c", temp_array[t]);
                  if (temp_array[t] == temp_array[1][j + 1])
                  {
                      printf("keys should be unique");
                      return 1;
                  }
              }
          }

       


      Reply


      https://edstem.org/us/courses/176/discussion/1198141

      [learn_press_profile]

    • Author
      Posts
    Log In Register Lost Password
    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.
    Log In

    Log in / Register

    Initiative by Digital Splendid OPC Pvt. Ltd.