How to count a sum, when the numbers are read from stdin and
stored into a structure?
Answer / pavan_mustyala
/**********
First construct the structure with total count on numbers
to be added. Now these members are accessed via that
structure variables. In the below example, structure
contains 2 numbers only.
***********/
#include <stdio.h>
struct numbers
{
int num1;
int num2;
};
void main()
{
struct numbers mpk;
int result;
printf("Enter two numbers");
scanf("%d%d",&mpk.num1, &mpk.num2);
result = mpk.num1 + mpk.num2;
}
Is This Answer Correct ? | 1 Yes | 0 No |
Write a c program to search an element in an array using recursion
what is the code of the output of print the 10 fibonacci number series
void main() { int c; c=printf("Hello world"); printf("\n%d",c); }
main() { float f=5,g=10; enum{i=10,j=20,k=50}; printf("%d\n",++k); printf("%f\n",f<<2); printf("%lf\n",f%g); printf("%lf\n",fmod(f,g)); }
Program to find the largest sum of contiguous integers in the array. O(n)
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
why java is platform independent?
How do you create a really large matrix (i.e. 3500x3500) in C without having the program crash? I can only reach up to 2500. It must have something to do with lack of memory. Please help!
write a function to give demostrate the functionality of 3d in 1d. function prototye: change(int value,int indexX,int indexY,int indexZ, int [] 1dArray); value=what is the date; indexX=x-asix indexY=y-axis indexZ=z-axis and 1dArray=in which and where the value is stored??
In the following pgm add a stmt in the function fun such that the address of 'a' gets stored in 'j'. main(){ int * j; void fun(int **); fun(&j); } void fun(int **k) { int a =0; /* add a stmt here*/ }
Finding a number multiplication of 8 with out using arithmetic operator