What is the algorithm to find discrete log in field of characteristic two?
Coppersmith's discrete logarithm method
What is the fundamental difference between while loops and numeric for loops?
There is no such difference, for and while loops are convertible:
in: for (exp1; exp2; exp3) stmt;
out: { exp1; while (exp2) { stmt; exp3; }}
in: while (exp) stmt;
out: for (; exp; ) stmt;
How do you evaluate the expression P86?
If it is a variable-name, then just fetch the value of the variable.
How do you write a c program for diff command that we use in unix?
Too difficult to answer here. I would find the source code and use that (if you really had to). Might require a 'port' to another operating system if it wasn't Unix based.
What is the difference between a loop and a whorl fingerprint?
That a loop is curved and a whorl is shaped like a wave.
Can you assigned value of int to a ordinary pointer?
Yes, with type-cast (but I don't see why you should):
char *ptr = (char *)300;
Why do you use semi colon in do while statement?
A semi-colon is used in a do while statement for the same reason that it is used in any other statement. The rules of C and C++, as well as Java, require that every statement be terminated with a semi-colon.
How does one convert ASCII capital letters into small letters?
Depends whether you are working Hex (take off 20) Dec (take off 32) Octal (take off 40) or HTML (take off 32).
#include <ctype.h>
if (isupper (c)) c= tolower (c);
What must identifiers start with?
the name of an identifier consists of letters and digits but name always starts with a letter.
Algorithm to arrange three numbers in ascending order using else if ladder?
step 1:start
step 2:input the values of a,b,c
step 3:if(a>b&&a>c) max=a
step 4:else if(b>c) max=b
step 5:else max=c
step 6:output:max
step 7:stop
How do you write the semicolon symbol in a pseudocode logic program delaing with classes?
Any of these:
PRINT semicolon
EMIT ;
WRITE ";"
etc.
Convert 110010 binary numbers to decimals?
Just like demical numbers follow a power rule: (5 x 10^1)+(0 x 10^0) = 50
Binary numbers have similar rules using 2's instead of 10's. The representation of 110010 would be (1 x 2^5)+(1 x 2^4)+(0 x 2^3)+(0 x 2^2)+(1 x 2^1)+(0 x 2^0); which is 32+16+0+0+2+0=50.
What is the running time of transforming an arbitrary array into heap?
Building a heap from an arbitrary array takes O(n) time for an array of n elements.
How many types of selection statements in c language?
there are two types of selection statements in c-language they are if-else and switch case.these two are known as selection statements,because their syntax is like this,
if-else syntax:-if(condition)
{
statements
}
else
{
statement
}
in the abow syntax it contains two blocks first one is if and second one is else in 'if' it fills with required condition if the condition is satisfied then it execute the if block,whether it is false it execute the else statements.
switch case syntax:-
switch(condition)
{
case.1:statements;
case.2:statements;
case.3:statements;
.
.
.
case.n:statements;
default:statement;
}
in abow switch case we can select any case and execute,in this selection statement gives the fiexibulity to the user.it contains default statement it shows the wrong selection in these cases.
examples programs to these statements:-
1.biggest of two numbers program?
main()
{
int a,b,c;
printf("enter a,b values");
scanf(&a);
scanf(&b);
scanf(&c);
if(a>b)
{
printf("a is big");
}
else
{
printf("b is big");
}
}
out put:-
enter a,b values 8,5
a is big
enter a,b values 3,9
b is big
2.perform arithmetic operation intwo numbers?
main()
{
int a,b,c,d;
printf("enter a,b values");
scanf(&a);
scanf(&b);
scanf(&c);
printf("enter your choice"&c);
switch(c)
{
case.1:d=a+b;
printf("d value is"&d);
case.2:d=a-b;
printf("d value is"&d);
case.3:d=a*b;
printf("d value is"&d);
default:printf("wrong selection");
}
}
out put:-
enter a,b values 6,5
enter your choice 1
d=11
enter your choice 2
d=1
enter your choice 3
d=30
Who invented the synthesizer algorithms programming language?
SNAP
Synthesizer Algorithms Programming
SNAP, which is an acronym for synthesizer algorithms programming, is a vendor-neutral programming language developed specifically for programming synthesizers of all examples from all eras that will teach the programmers the fundamental techniques in analog & digital sound manipulation and sound design in order to achieve a desired sonic goal.
SNAP was invented and given its name, description and an accompanying SNAP programming user's guide during the summer of 2008 by prolific inventor Andre Gray, the inventor of ringtones, and the electronic press kit among many other digital media inventions.
C program to find sum of odd numbers in an array?
#include<stdio.h>
#include<conio.h>
void main()
{
int n, a[10, evensum=0, oddsum=0, i;
printf("\n Enter the number of values");
scanf("\n %d", &n);
printf("\n Enter %d number of values", n);
for(i=0; i<n; i++)
scanf("\n %d", &a[i]);
while(i<n)
{
if(a[i]%2==0)
evensum=evensum + a[i];
else
oddsum=oddsum + a[i];
}
printf("\n Odd sum = %d", oddsum);
printf("\n Even sum = %d", evensum);
getch();
}
Hopefully, is that correct, anyone out there.... I am a beginner and this is my homework, please help me correct the mistaks if you know them...
1 PRINT "Kindly enter your next number, Master, or 'x' to end and total them up."
2 INPUT a$: IF a$ = "x" or a$ = "X" then GOTO 10
3 K = VAL(a$)
4 If K<0 then neg=neg+1: PRINT: GOTO 1
5 If K>0 then pos=pos+1: PRINT: GOTO 1
6 If K=0 then Z=z+1: PRINT: GOTO 1
10 PRINT: PRINT "Thank you, Master. I cannot express the joy that this exercise
has brought me. Here are your results: "
11 PRINT: PRINT "The number of positive numbers you entered was "; pos; "."
12 PRINT: PRINT "The number of negative numbers you entered was "; neg; "."
13 PRINT: PRINT "The number of zeros you entered was "; Z; "."
15 PRINT: PRINT: PRINT "Would you like to play again, Master ?"
16 PRINT "Kindly touch 'x' if no, or any other key if yes. I can hardly wait."
17 Input a$: IF a$ <> "X" and a$ <> "x" then GOTO 20
18 PRINT: PRINT "It has been my pleasure to cavort with you today, Master."
19 PRINT "Y'all come back now, y'hear !" : END
20 PRINT: CLS: PRINT "Oh GOODY! I love this game!"
21 pos=0: neg=0: Z=0
22 GOTO 1