1,475 Answered Questions for the topic computer programming
Computer Programming
10/03/20
what is the specific reason behind getting these two warning? (need an extended explanation)
#include <stdio.h> #include <stdlib.h> int *get_val(int y) { int x = 200; x += y; return x; } int main() { int p, y = 10; p = get_val(y); printf("%d ", p); exit(0); }After compiling the...
more
Computer Programming
09/30/20
write a c code to implement it. You also need to code for insertion (at start, at end, at a specific position), deletion (at start, at end, at node) and display operation.
a doubly circular linked list data structure
09/30/20
What is the time and space complexity of the following code:
void fun(int n){int temp[n][n];for(int i=0;i<n;i++) for(int j=0;j<n;j++) temp[i][j]=i+j;}
Computer Programming
09/29/20
What is wrong with the following code? and what will be the rectified version of this code ?
#include <stdio.h> #include <stdlib.h> int *get_val(int y) { int x = 200; x += y; return &x; } int main() { int *p, y = 10; p = get_val(y); printf("%d ", *p); exit(0); }
Computer Programming
09/29/20
What situation has occurred after the last assignment of the following code?
What situation has occurred after the last assignment of the following code?int *p = malloc(sizeof(int));*p = 400;p = NULL;
Computer Programming
09/29/20
WHAT IS THE WRONG WITH THIS CODE?
#include <stdio.h>#include <stdlib.h>int *get_val(int y) {int x = 200;x += y;return &x;}int main() {int *p, y = 10;p = get_val(y);printf("%d ", *p);exit(0);}
Computer Programming Computer Science
09/29/20
Does anyone know how I can fix this error in my program? It is not printing the even numbers to the console.
Write a program that reads an integer and prints the sum of all even integers between 2 and the input value, inclusive.I have uploaded a image of my program to google...
more
Computer Programming Computer Science
09/29/20
Does anyone know how I can fix this error in my program? It is not printing the even numbers to the console.
Write a program that reads an integer and prints the sum of all even integers between 2 and the input value, inclusive.I have uploaded a image of my program to google...
more
09/29/20
How to make a class called time on java with these data informaton:
■Class Time■-second:int = 0 ----> hour:[o, 23]--minute:int = 0 ----> minute: [o, 59]-hour: int=0 -----> second: [e, 59]Methods:-+Time()+Time (second: int, minute: int, hour: int)+getHour):...
more
Computer Programming
09/26/20
What is the error?
import java.io.*;import java.util.*;import java.util.Scanner; class Main { static Scanner cin = new Scanner(System.in); public static void main(String[] args){ int correct = 0; ...
more
09/25/20
Statistic using R
In order to adjust the values of the food vouchers of the 9.443 employees of your company, a study will be carried out with the objective of evaluating the average monthly expenditure in...
more
09/24/20
database assignment
You are working in a Library and the Supervisor has asked you to create a database to store the data in the tables below. use MS access any versionUsers...
more
Computer Programming Highschool
09/22/20
Why did WWII lead to significant increases in computer development?
09/22/20
C# Display a pyramid
Hi!I have found this code in the internet: for (int i = 1; i< 10; i++) { for(int j= 1; j<= i; j++) { Console.Write(i); ...
more
Computer Programming Java
09/22/20
pseudocode in java
Write pseudocode for a recursive method that will calculate the expected value of a decision tree, assuming that all decisions are made by maximizing the expected utility. Your method should return...
more
09/21/20
How can I print these elements of the list in python?
The list is given [ 1, 2, [3, 4, 5], [6, 7]]. How can show the output as 1, 2, 3, 4, 5, 6, 7.
09/19/20
Help with understanding a Javascript program that deals with using trigonometry and transformations
var numPlanets = 4;
var arms = 11;
var speed = 0.015;
var tick = 0;
translate(200,200);
var draw = function() {
background(0, 0, 0);
tick += speed;
for (var s = 10; s < arms...
more
09/19/20
Computer Science - Graphs
I've been given an adjacency matrix and asked to state whether the corresponding graph is undirected or not.How do we say whether a graph is undirected or not simply looking at its adjacency matrix.
Computer Programming Computer Science
09/16/20
How to find the address in column major order?
In a 2D integer array TD, assume that the row indices range from -3 to 7 and column indices range from 6 to 14. An element TD [-3, 6] stored at address 3220. Find out the dimension of TD and...
more
Computer Programming Computer Science
09/15/20
In the case of 2D arrays:
Consider a 2D array A of 30 (5x6) elements is stored in the memory of 120 bytes from 2100 to 2216. Find out the address of A[2][4] element in row-major and column-major order.
Computer Programming Computer Science
09/15/20
Find the address of:
Consider an array of 20 elements is stored in the memory of 40 bytes from 200 to 238. Assume array index starts from 3. Find out the address of 10th index element.
09/15/20
Java Messenger Application
Problem Description: Distributed banking application You are required to build an application for Bank of Fiji. The application will allow users to create a bank account and use deposit and...
more
Computer Programming
09/14/20
user-defined function
recode the program below by adding another user-defined function that will display the level welcome message. Explain the revision that you have made in your program. Explain how the program...
more
Computer Programming Java
09/14/20
java programming
a) Write a method that takes as input a 2-dimensional matrix representing the joint probability distribution over two variables, and returns the marginal probability distribution for either the...
more
09/13/20
Whats the answer for these Classes and Objects exercise?(Java)
Question 1: Create a class Circle with data types (radius, colors) and methods getRadius (0, getArea().Question 2: Create a class Car with data types (plateNumber, xLocation, yLocation, speed) and...
more
Still looking for help? Get the right answer, fast.
Ask a question for free
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.