answersLogoWhite

0


Best Answer

The element at offset index 3 is 12.

int num[6] {20, 45, 56,12, 19, 34};

assert (num[3]==12);

User Avatar

Wiki User

7y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

7y ago

It is 56.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: If you declare an integer array as int num 20 45 56 12 19 34 what is the value of num3?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

A program to find the sum of n numbers in visual basic?

//Script by aakash30jan <script type="text/vbscript"> For count = 1 to 10 sum=sum+count document.write("<br />" & sum) Next </script>


Write algorithm of a largest number in three numbers?

1. Read the 3 nos a,b,c 2. Let larget = a 3. if b > largest then largest = b 4. if c > largest then largest = c..... If you have to process more nos, read all of them in an array. Assume the first element be largest, do comparison through all elements of the array.... Similar algorithm can be developed for finding the lowest also. /*lab practice 2 damithguruge question 4 */ #include<stdio.h> int main() { int num1,num2,num3,num4; int smallest; printf("Please enter a number1"); scanf("%d%*c", &num1); printf("Please enter a number2"); scanf("%d%*c" ,&num2); printf("Please enter a number3"); scanf("%d%*c", &num3); Printf("Please enter a numbe4r"); scanf("%d%*c", &num4); /* num1 set as the smallest */ smallest=num1; if(smallest > num2) then smallest=num2; else if smallest >num3 then smallest=num3; else if smallest>num4 then smallest=num4; printf("smallest number:%d\n,smallest"); return(0); endif endif endif }


C program to arrange 7 numbers in ascending order?

#include<stdio.h> #include<conio.h> void main() { int i,j,temp,a[7]; clrscr(); printf("Enter 7 integer numbers: \n"); for(i=0;i<7;i++) scanf("%d",&a[i]); for (i=0;i<7;i++) { for(j=i+1;j<7;j++) { if(a[i]<a[j]) { temp=a[i]; a[i]=a[j]; a[j]=temp; } } } printf("\n\nThe 7 numbers sorted in ascending order are: \n"); for(i=0;i<7;i++) printf("%d\t",a[i]); getch(); }


Write a program that sorts three integers The integers are entered from the input dialogs and stored in variables num1num2 and num3 respectively The program sorts the numbers so that num1 num2num3?

Scanner misterscan = new Scanner(System.in); int num1, num2, num3; int [] temp = new int[3]; for (int k = 0; k < 3; k ++) { System.out.print("Enter num: "); temp[k] = misterscan.nextInt(); } Arrays.sort(temp); //Uses merge sort, and since I am lazy I cheated. num1 = temp[0]; num2 = temp[1]; num3 = temp[2];


What is the prototype of scanf in c programmin?

int scanf(char* format, ...); the format accepts the format specifier string, the elipsis operator accepts the variable list scanf("var type var type ...", &var, &var, ...); example: int num1, num2, num3; scanf("%d %d %d",&num1,&num2,&num3); Is that what you were looking for? Maybe this can help also...

Related questions

What is function in vb net?

1st, I hope you do know what a 'sub' is, if you don't, anyways its like a paragraph that includes codes to be executed when an event happens, as button.click event or mousehover event a function is like a sub but returns a value, and does the same work of a variable, for example you can make a function for adding numbers: private function Name_Of_Your_Function(Byval num1 as integer,byval num2 as integer) as integer and now u made a function that dims 2 variables (num1, num2) and returns an integer (as integer) now we type inside it: dim num3 as integer num1 + num2 = num3 return num3 notice the return cmd, u can also type: Name_Of_Your_Function = num3 Notice that we didnt dim the num3 in the function declaration ull know why later now put 2 textboxs and a button and in the Sub of the button add: dim frstnum, scndnum as integer and assign them the textboxs input now to call out function we right its name: Name_Of_Your_Function() now we put in the brackets the old num1 and num2,, but as whatever we want, so if we want to add 1 and 6 we do: Name_Of_Your_Function(1, 6) now we want to add variables frstnum and scndnum so we will do Name_Of_Your_Function(frstnum, scndnum) and now to get the result we'll get the value of the function, remember? so we wil assign the value of that function to a new variable for us to use dim answer as integer answer = Name_Of_Your_Function And then add a label and do label1.text = answer and your done! You successfully used a function I hope you understood the consept, you can make functions return other things than integers tho, as strings and booleans


Write a C program that prompts the user for three decimal numbers and prints them trimmed as integer values. For example, if the user informs the values 13.2, 12.5, 102.231, the program prints out 13, 12, 102?

Here's a simple C program that prompts the user for three decimal numbers, converts them to integers, and prints the trimmed integer values: c Copy code #include int main() { double num1, num2, num3; // Prompt the user for three decimal numbers printf("Enter three decimal numbers: "); scanf("%lf %lf %lf", &num1, &num2, &num3); // Convert and print the trimmed integer values int intNum1 = (int)num1; int intNum2 = (int)num2; int intNum3 = (int)num3; printf("Trimmed integer values: %d, %d, %d\n", intNum1, intNum2, intNum3); return 0; } In this program: We declare three variables num1, num2, and num3 to store the decimal numbers entered by the user. We use printf to prompt the user to enter three decimal numbers. We use scanf to read and store the user's input in the variables num1, num2, and num3. We then convert these decimal numbers to integers by casting them using (int) and store them in intNum1, intNum2, and intNum3. Finally, we use printf again to print the trimmed integer values. Compile and run the program, and it will prompt you for three decimal numbers and print their trimmed integer values as requested.


How can you write a fibonocci sequence in python?

A fibonocci sequence is a sequence where each term is equal to the sum of the previous two terms.1, 1, 2, 3, 5, 8, 13, 21, etcThere are two main ways to do this with Python. The way explained here is through a loop or iteration. The other way would be to use recursion (a function that calls itself).Note that anything following # is a comment and not part of the code.Also note that the semicolons are NOT required.top = raw_input("How high should I go?"); #prompt the user for the stopping pointnum1, num2, num3 = 0, 0, 1; #set the num1, num2, and num3 variables equal to 0, 0, and 1 respectivelytop = int(top); #top was initially a string variable, this converts it to an integer so we can compare it to our current termprint 1; #print the first 1 in the serieswhile num3 < top: #execute the indented code while num3 is less than top (our stopping point)num1 = num2; #set num1 equal to num2 (this is 2 terms ago)num2 = num3; #set num2 equal to num3 (this is the last term)num3 = num1 + num2; #calculate the new term for num3print num3; #display the new term


A program to find the sum of n numbers in visual basic?

//Script by aakash30jan &lt;script type="text/vbscript"&gt; For count = 1 to 10 sum=sum+count document.write("&lt;br /&gt;" &amp; sum) Next &lt;/script&gt;


what the mixture of radon and gun powder was Ingnited?

#include int main() { double num1, num2, num3; // Prompt the user for three decimal numbers printf(&quot;Enter the first decimal number: &quot;); scanf(&quot;%lf&quot;, &amp;num1); printf(&quot;Enter the second decimal number: &quot;); scanf(&quot;%lf&quot;, &amp;num2); printf(&quot;Enter the third decimal number: &quot;); scanf(&quot;%lf&quot;, &amp;num3); // Trim the numbers to integers int intNum1 = (int)num1; int intNum2 = (int)num2; int intNum3 = (int)num3; // Print the trimmed integer values printf(&quot;Trimmed integers: %d, %d, %d\n&quot;, intNum1, intNum2, intNum3); return 0; }


Write algorithm of a largest number in three numbers?

1. Read the 3 nos a,b,c 2. Let larget = a 3. if b &gt; largest then largest = b 4. if c &gt; largest then largest = c..... If you have to process more nos, read all of them in an array. Assume the first element be largest, do comparison through all elements of the array.... Similar algorithm can be developed for finding the lowest also. /*lab practice 2 damithguruge question 4 */ #include&lt;stdio.h&gt; int main() { int num1,num2,num3,num4; int smallest; printf("Please enter a number1"); scanf("%d%*c", &amp;num1); printf("Please enter a number2"); scanf("%d%*c" ,&amp;num2); printf("Please enter a number3"); scanf("%d%*c", &amp;num3); Printf("Please enter a numbe4r"); scanf("%d%*c", &amp;num4); /* num1 set as the smallest */ smallest=num1; if(smallest &gt; num2) then smallest=num2; else if smallest &gt;num3 then smallest=num3; else if smallest&gt;num4 then smallest=num4; printf("smallest number:%d\n,smallest"); return(0); endif endif endif }


C program to arrange 7 numbers in ascending order?

#include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int i,j,temp,a[7]; clrscr(); printf("Enter 7 integer numbers: \n"); for(i=0;i&lt;7;i++) scanf("%d",&amp;a[i]); for (i=0;i&lt;7;i++) { for(j=i+1;j&lt;7;j++) { if(a[i]&lt;a[j]) { temp=a[i]; a[i]=a[j]; a[j]=temp; } } } printf("\n\nThe 7 numbers sorted in ascending order are: \n"); for(i=0;i&lt;7;i++) printf("%d\t",a[i]); getch(); }


Write a program that sorts three integers The integers are entered from the input dialogs and stored in variables num1num2 and num3 respectively The program sorts the numbers so that num1 num2num3?

Scanner misterscan = new Scanner(System.in); int num1, num2, num3; int [] temp = new int[3]; for (int k = 0; k &lt; 3; k ++) { System.out.print("Enter num: "); temp[k] = misterscan.nextInt(); } Arrays.sort(temp); //Uses merge sort, and since I am lazy I cheated. num1 = temp[0]; num2 = temp[1]; num3 = temp[2];


What is the prototype of scanf in c programmin?

int scanf(char* format, ...); the format accepts the format specifier string, the elipsis operator accepts the variable list scanf("var type var type ...", &amp;var, &amp;var, ...); example: int num1, num2, num3; scanf("%d %d %d",&amp;num1,&amp;num2,&amp;num3); Is that what you were looking for? Maybe this can help also...


Addition and subtraction of two 16 bit numbers using 8085 microprocessor?

The 8085 is an 8-bit computer, with only limited capability to do 16 bit arithmetic. In order to add two 16-bit numbers, NUM1 and NUM2, together, and store the result at NUM3, you can use the code... LHLD NUM1 XCHG LHLD NUM2 DAD D SHLD NUM3 If you want to subtract NUM1 from NUM2, you need to take the two's complement first, by inverting it and adding one... LHLD NUM1 MOV A,H CMA MOV H,A MOV A,L CMA MOV L,A INX H ... and then continue with adding NUM2... XCHG LHLD NUM2 DAD D SHLD NUM3


Program to fnd the biggest of 3 numbers in Java script?

Here is the code: &lt;html&gt; &lt;head&gt; &lt;script type="text/javascript" langage="javascript"&gt; function getHighest() { var a = parseInt(document.getElementById("num1").value); var b = parseInt(document.getElementById("num2").value); var c = parseInt(document.getElementById("num3").value); if((a&gt;b)&amp;&amp;(a&gt;c)) { alert(a+" is the highest number"); } else if((b&gt;a)&amp;&amp;(b&gt;c)) { alert(b+ " is the highest number"); } else if((c&gt;a)&amp;&amp;(c&gt;b)) { alert(c+ " is the highest number"); } else { alert("One of them is not an int"); } } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; Input a: &lt;input type="text" name="number1" id="num1" /&gt;&lt;br /&gt; Input b: &lt;input type="text" name="number2" id="num2" /&gt;&lt;br/&gt; Input c: &lt;input type="text" name="number3" id="num3" /&gt;&lt;br/&gt; Submit: &lt;input type="submit" name="submit" value="submit" onclick="javascript:getHighest();return false;" /&gt; &lt;/body&gt; &lt;/html&gt;


Write a program which takes any 4 numbers from users the program should display the sum of squares of these numbers?

/* I'm using four spaces instead of tab because I'm writing this on an iPhone. */ #include #include int main() { int num1, num2, num3, num4, sum; printf("Please enter first number: "); scanf("%d", num1); printf("Please enter second number: "); scanf("%d", num2); printf("Please enter third number: "); scanf("%d", num3); printf("Please enter fourth number: "); scanf("%d", num4); sum = pow(num1, 2) + pow(num2, 2) + pow(num3, 2) + pow(num4, 2); printf("The answer is %d", sum); return 0; }