Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I would like to compare two dna sequences in C. How can i compare two strings and gets the difference?
Let's say:
seq_a:
GATCAACGCAAAGGACTAAGCACTGCTGCCAAA
and
seq_b:
GATCAACGCAAAGGACTAAGCACTGCTGCCTGC
result: TGC or GATCAACGCAAAGGACTAAGCACTGCTGCC***
Hard-code the traversal of two strings in a while loop. If they're the same, output either string1[i] or string2[i]. If they're different, write a star.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I am a beginner, how to define vectors of complex numbers with random values of size N in C program. With this code
complex*vector=(complex*)malloc(sizeof(complex)*N)
You have two separate problems, both of which are already answered.
How work with complex numbers: How to work with complex numbers in C?
How to make an array of random numbers: To generate array of random numbers in a given range in "C"
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm new to C and I have an assignment where I have to build a dictionary (Linked List in a way). Basically the user inputs several words,year and their definition this:
Example:
love_#_2004_#_LOVING
trade_#_2001_#_INVEST
etc...
And basically I need a function to scan the definition (Ex: INVEST)
and gives me the word trade.
If the definition is related to more than only one word to give me back all the words it relates to.
What sort of a function do I need to scan these strings?
If the word you search is always the last one and the formatting is always the same, then use strtok with _ and copy the last entry, which holds the string you are looking for.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Can anyone tell me how to find (2^101100111000)%1000000007 in C?
There is a problem in which we have to convert a number into binary(1<=N<=600000) and find
2^(binary representation of N)modulo1000000007.
The values you are talking about will not fit into a standard long on any architecture, so you will have to use an arbitrary precision maths library such as GMP.
Hmm, just read Zong's answer... he's pointing to a more efficient method... haven't finished reading through the article but it looks like the better way to go...
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
my input is of form of: number:number for example 16:13
my goal is to take this input and break it to the two numbers.
for example first number is 16, second number is 13.
is there a way to use SCANF to read the numbers directly? or the only was is to use a function to convert the string to numbers after i lose the separator?
i can not change the format of the input.
This should do the trick.
scanf_s("%d:%d", &num1, &num2);
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am looking for a package, or easy implementation of CRC 16-bit code by MATLAB
How about file exchange?
http://www.mathworks.com/matlabcentral/fileexchange/20350-16-bit-itu-t-crc