Answer:Following is the C program:-
#include <stdio.h>
int fun()//function fun of return type int and it returns value 6.
{
return 6;
}
int main() {
int a, b;
a = 10;
b = a + fun();//adds 6 to a.
printf("With the function call on the right, ");
printf("\n%d ",b);//printing b..
return 0;
}
Output:-
With the function call on the right,
16
Explanation:
The function fun return the value 6 so it adds 6 to a and stores the result in b.
Answer:
ssume that,
Maximum “students” count can be 10.
*Driver Class*
*Solution class*
import java.util.*;
class Student {
private String name;
private int rollNo;
public String getName() {}
public void setName(String name) {}
public int getRollNo() {}
public void setRollNo(int rollNo) {}
};
class ClassRoom {
private int i;
private Student[] students;
public void addStudent(String name, int rollNo) {}
public Student[] getAllStudents() {}
};
Answer:
#program in Python
#read until user Enter an integer
while True:
#try block to check integer
try:
#read input from user
inp = int(input("Enter an integer: "))
#print input
print("The integer is: ",inp)
break
#if input is not integer
except ValueError:
#print message
print("Wrong: try again.")
Explanation:
In try block, read input from user.If the input is not integer the print a message in except block.Read the input until user enter an integer. When user enter an integer then print the integer and break the loop.
Output:
Enter an integer: acs
Wrong: try again.
Enter an integer: 4a
Wrong: try again.
Enter an integer: 2.2
Wrong: try again.
Enter an integer: 12
The integer is: 12
A feature in Excel that allows you to graphically display in a single cell the trend across a range of cells is called a sparkline.
A device that sucks bc mien broke