Recent content by toforfiltum
-
Program to display letter combinations on phone keypad
I've finally come up with a working solution using loops! The idea behind my code is like a binary counter. Here it is: #include <stdio.h> #include <stdlib.h> #include <string.h> void recurse( char str[], char caller, char *array[] ); int main () { char *array[8] = { "ABC", "DEF", "GHI"...- toforfiltum
- Post #12
- Forum: Engineering and Comp Sci Homework Help
-
Program to display letter combinations on phone keypad
Yes, but how would this work if the user can input unlimited numbers? It is here precisely that I'm stuck. I can't be writing so many nested loops...- toforfiltum
- Post #8
- Forum: Engineering and Comp Sci Homework Help
-
Program to display letter combinations on phone keypad
Aha! No. When this problem was given, we were supposed to solve it using just normal loops. Problem is I can't seem to figure that out. When I started thinking on how to use loops, I first started with a while loop to run through all the cases of the alphabets associated with the last number...- toforfiltum
- Post #6
- Forum: Engineering and Comp Sci Homework Help
-
Program to display letter combinations on phone keypad
I have run it on gdb and I received some kind of error telling me that program can't access memory and also some segmentation faults. But thanks for alerting me about modifying caller...I realized that there are some huge errors now in my code needed to be corrected. Thanks.- toforfiltum
- Post #3
- Forum: Engineering and Comp Sci Homework Help
-
Program to display letter combinations on phone keypad
Homework Statement On a phone keypad, many of the numbers have letters associated with them. For instance, the letters A, B, and C are associated with the number 2. Write a program that accepts a number as input and prints all of the possible letter combinations associated with that number. For...- toforfiltum
- Thread
- C language Combinations Program
- Replies: 12
- Forum: Engineering and Comp Sci Homework Help
-
Engineering Simplifying switching circuit literals
I'm sorry, although I now understand the distinction, I still can't get the right answer I'm not too sure if I know what the question asks, but it states that the final form needs to be simplified to 9 switching elements. And no, I don't have the answer. Does a switching element correspond to...- toforfiltum
- Post #5
- Forum: Engineering and Comp Sci Homework Help
-
Engineering Simplifying switching circuit literals
I would count the number of terms in a SOP form. Would that be right? So I think I may be wrong, 9 circuit elements means just 9 switches?- toforfiltum
- Post #3
- Forum: Engineering and Comp Sci Homework Help
-
Engineering Simplifying switching circuit literals
Homework Statement The problem is given in the picture attached. It is a network of switches.Homework EquationsThe Attempt at a Solution I managed to simplify the expression to this: ## (S + x'(w+y) + xvz)(x'+y)(v+z') ## but I just can't find a way to simplify it to 9 literals. I've tried all...- toforfiltum
- Thread
- Boolean algebra Circuit Electrical engineering
- Replies: 5
- Forum: Engineering and Comp Sci Homework Help
-
A C program to determine the most common birthday
Homework Statement Write a program that opens a file of the users choice that contains a list of birthdays. Extract from this file two things: (1) the date with the most common birthday (all of them) and (2) the month with the most people born. We will not test for a tie in either of these...- toforfiltum
- Thread
- C programming Program
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
Simple C program involving arrays which cannot execute
So would it be something like %100s? And also, if I were to do this with fgets instead, I should put 99 to account for the null character, right? Wow, I didn't know that there could be so many bytes in just a few letters! The double x and int i gets printed after the string. Is this something...- toforfiltum
- Post #21
- Forum: Engineering and Comp Sci Homework Help
-
Simple C program involving arrays which cannot execute
Won't there be a null character right after"uesday"?- toforfiltum
- Post #18
- Forum: Engineering and Comp Sci Homework Help
-
Simple C program involving arrays which cannot execute
Sorry for the late reply! I have been busy, but I really appreciate yours and Mark44's help! It seems I've made the question to be more complicated than it needs to be. Here is my much improved (hopefully!) version of the code: #include <stdio.h> #include <string.h> int main (void) { char...- toforfiltum
- Post #16
- Forum: Engineering and Comp Sci Homework Help
-
Simple C program involving arrays which cannot execute
I haven't yet learned dynamic memory management, but I'll get back to it later after fixing a bug in my program. I have managed to make it work somewhat, but not exactly right, and also using much more lines of code than you said was necessary. I'm not sure if the question meant just constantly...- toforfiltum
- Post #13
- Forum: Engineering and Comp Sci Homework Help
-
Simple C program involving arrays which cannot execute
Thanks! Just to be sure, scanf stores the newline character, but fgets doesn't, right?- toforfiltum
- Post #9
- Forum: Engineering and Comp Sci Homework Help
-
Simple C program involving arrays which cannot execute
Thanks so much for your help! However, I'm not sure if I could see any difference between both. Both reads from stdin, and stores it in the character array my_string.- toforfiltum
- Post #7
- Forum: Engineering and Comp Sci Homework Help