answersLogoWhite

0

Still curious? Ask our experts.

Chat with our AI personalities

DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin
SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
RossRoss
Every question is just a happy little opportunity.
Chat with Ross

Add your answer:

Earn +20 pts
Q: Difference between signed and unsigned int?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Basic Math

What is the difference between function and recursive function?

I will explain in the easiest way the difference between the function and recursive function in C language. Simple Answer is argument of the function is differ but in the recursive function it is same:) Explanation: Function int function(int,int)// function declaration main() { int n; ...... ...... n=function(a,b); } int function(int c,int d) { ...... ...... ...... } recursive Function: int recursive(int,int)// recursive Function declaration main() { int n; ..... ..... ..... ..... n=recursive(a,b); } int recursive(int a,int b) { ..... .... .... .... } Carefully see, In the recursive Function the function arguments are same.


What is the algorithm for finding the prime numbers between 1 and 100?

Code example:/* ******************************************************************************** * FUNCTION: bIsAPrime ******************************************************************************** * AUTHORS: * Flaun * * DESCRIPTION: * Finds if a given number is a prime number. * * PARAMETERS: * uiTestNumber: An unsigned integer to test. * * RETURNS: * bTRUE or bFALSE ******************************************************************************** */ #define bTRUE 1 #define bFALSE 0 #define iNO_REMAINDER 0 #define bIS_ODD(uiNumber) ((uiNumber) & 1) typedef int BOOL BOOL bIsAPrime( unsigned int uiTestNumber) { /* 4 is the first non prime number. */ if(uiTestNumber > 3) { /* The only even prime number is 2. */ if(!bIS_ODD(uiTestNumber)) { return bFALSE; } else { /* The only numbers left to divide against are 3, 5 and 7. */ /* All numbers that are divisible by a number > 7 are divisible */ /* by a number < 8. */ unsigned int uiDivisor = 0; for(uiDivisor = 3; uiDivisor


Do while loop examples?

i=0; do{ i++; }while(i&lt;10);


What is function parameters?

whatever the variables we declare in function signature to receive the arguments at the calling that are known as parameters.. e.g. int sum(int a,int b); here a &amp; b are known as parameters.....


What is a Java program that finds the least common multiple of three integers?

// The "LCMTest" class. import hsa.*; public class LCMTestDanyalM { // Place your lowestCommonMultiple code here public static int lowestCommonMultiple (int firstNumber, int secondNumber) { /// int product = 1; // int limit = firstNumber * secondNumber; for (int count = 1 ; ; count++) { if (count % firstNumber 0) { return count; } } } // Do not modify the code below public static void main (String [] args) { Console c = new Console (); final int NO_OF_TEST_CASES = 1000000; // maximum of 1000000 int [] first = new int [NO_OF_TEST_CASES]; int [] second = new int [NO_OF_TEST_CASES]; int [] LCM = new int [NO_OF_TEST_CASES]; c.println ("Loading the data..."); TextInputFile inFile = new TextInputFile ("lcmdata.txt"); int index = 0; while (!inFile.eof () &amp;&amp; index &lt; first.length) { first [index] = inFile.readInt (); second [index] = inFile.readInt (); LCM [index] = inFile.readInt (); index++; } inFile.close (); // Testing the correctness and speed c.println ("Start Timing"); long startTime = System.currentTimeMillis (); for (int nextTest = 0 ; nextTest &lt; first.length ; nextTest++) { int studentLCM = lowestCommonMultiple (first [nextTest], second [nextTest]); if (studentLCM != LCM [nextTest]) { c.println ("Incorrect: For " + first [nextTest] + " and " + second [nextTest] + " you got " + studentLCM + " for the lowest common mulitple," + "\nbut the answer should be: " + LCM [nextTest]); break; } } long endTime = System.currentTimeMillis (); c.print ("Total Time: "); c.println ((endTime - startTime), 20); c.println ("Program Complete"); } // main method } // Perfect class