Questions tagged [compare]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
27 views

Problem in C programming about condition

Well, I am learning C programming.Today I faced a problem while coding. I have made a string variable named,"answer". But when I wrote a condition, I found an error message but I don't know ...
user avatar
1 vote
1 answer
19 views

How does compare2.c work?

I'm just watching lecture 3 right now and I can't understand how is compare_strings works. It has for loop that comparing if i < n and n = strlen(a), so if i'm passing name like David strlen(a) ...
user avatar
0 votes
1 answer
146 views

PSET 6 [Similarities - less] How is the compare file accessed in this problem since it is not imported to application.py

(Dont be intimidated by length of code chunks, I included all of my guess as to what's going on, so most of it is just stuff to skim over) The folder similarities contains static and template folders ...
user avatar
0 votes
1 answer
81 views

What is if __name__ == "__main__": doing in compare pset6?

I read the documentation, but I still can't pinpoint exactly what it is this line of code is doing in compare. The code of compare is as follows: #!/usr/bin/env python3 import argparse import re ...
user avatar
0 votes
1 answer
287 views

Similarities Pset6 - submit button not working

Quick question. My code passes check50 and submit50 but for whatever reason I can't seem to get the actual program to work i.e. when I click the compare button on my form nothing happens. Here is my ...
user avatar
0 votes
1 answer
79 views

how do i compare the result of an fread to a hex value?

fread(&quad, sizeof(FIRSTFOUR), 1, inptr); so I get the first four bytes (FIRSTFOUR is a struct with four BYTES defined first, second, third, fourth) but how do I compare quad.first to oxff, etc???...
user avatar
  • 35
0 votes
1 answer
249 views

Comparing chars

I'm trying to write some code that will take input, loop through the characters in the input, and print "hi" for every "a" that shows up in the input. I'm getting errors trying to compare the looped ...
user avatar