Skip to main content
1 vote
1 answer
97 views

When I set a DEBUG trap in Bash like this: set -o functrace trap 'echo "# $BASH_COMMAND" >&2' DEBUG Suddenly, this function stopped working: getBase() { local base="$1" ...
Maestro's user avatar
  • 9,876
0 votes
0 answers
82 views

` void DisplayFood(int*NumOfFood,int*Rno,char *Names[],int*Price,int*Quantity,char*mfg[],char*exp[]) { int i =0; for(i=0;i<*NumOfFood;i++) { printf("\n%-20d",Rno[i]); ...
Trương Công Trình's user avatar
0 votes
0 answers
229 views

I'm trying to convert the unsigned long integer converted_binary, which contains 10000000000 to a string, but sprintf converts it to a single character 1 instead. I am able to know this through the ...
Olamide Olanrewaju's user avatar
1 vote
2 answers
307 views

I have a debugger class which implements a printf() c style method. It looks like this: #define NO_DEBUG 0 #define NO_PREFIX 1 #define DEBUG_INFO 2 #define DEBUG_SUCCESS 3 #define DEBUG_WARN 4 #define ...
Dr.Random's user avatar
  • 520
0 votes
1 answer
114 views

Here is a simple module containing a down counter: import chisel3.util.{Valid, DeqIO} class Input(WIDTH : Int) extends Bundle { val x = UInt(WIDTH.W) } class Output(WIDTH : Int) extends Bundle { ...
Gaslight Deceive Subvert's user avatar
-2 votes
1 answer
147 views

I have an question about the .exe log. I am using raspberry pi 4 module with Debian OS where I am running my c-program from the .service base auto-start .exe process. Which is running well So whenever ...
Ketan Vadodariya's user avatar
1 vote
1 answer
135 views

I am learning how to create struct's and I am stuck on a program I made. Everything works fine until I try to input "2". When the program prints the symbol it's supposed to be "He" ...
Nightmare Sky's user avatar
0 votes
0 answers
89 views

Hi I am new to C but not to programming(Only have experience in high-level languages like Python and JS). In my CS assignment I have to implement a function that decodes an encrypted string.(The ...
Grey_dev1997's user avatar
0 votes
1 answer
79 views

I finished the challenge and my first C code worked apparently well, returning each time the correct minimum number of coins needed for change. Then when I tried to "clean it up" a bit and remove a ...
Daniel Fernandez's user avatar
0 votes
1 answer
1k views

Please note this is not C++ code and I'm not developing a Qt app. I mostly develop embedded code and someone has knocked up a neat LCD emulator so we can write quite a lot of the code independent of ...
DiBosco's user avatar
  • 876
0 votes
1 answer
561 views

See my code char t[]= "{\n abcdeffgjejgjergnjkengkknkn \n"; printf("%s",t); char t1[]= "{ abcdeffgjejgjergnjkengkknkn \n aaffdefa"; printf("%s",t1); Actual Output: { { abcdeffgjejgjergnjkengkknkn ...
jtro's user avatar
  • 151
0 votes
3 answers
2k views

Why does the following code produce an error? I don't understand why the curly braces are making a difference. #include<stdio.h> int main(void) { { int a=3; } { ...
Debmalya Panday's user avatar
1 vote
3 answers
781 views

I can't understand why the following code outputs 10. What I understand is that !printf("0") means !0, which is TRUE. So why doesn't the code print "Sachin" #include <stdio.h> int main() { ...
Debmalya Panday's user avatar
0 votes
4 answers
90 views

My program is supposed to print out a table like this: Time Fraction Since Midnight 12:00 AM 0.0000 1:00 AM 0.0417 2:00 AM 0.0833 3:00 AM 0....
newtojava's user avatar
-1 votes
1 answer
1k views

I have a string array in a matlab script called "dataString" that was copied into MATLAB from an html document using fileread(). I then cut out the part I wanted and stored that in dataString. TEXT =...
Unique Worldline's user avatar

15 30 50 per page