answersLogoWhite

0

Write a C program for sum of n numbers using pointers?

Updated: 8/17/2019
User Avatar

Wiki User

11y ago

Best Answer

void main()

{

int n=0,i,*p;

clrscr();

printf("enter the value of n");

scanf("%d",&n);

p=&n;

for(i=0;i<=n;i++)

{

*p=*p+i;

}

printf("value of the sum is %d",*p);

getch();

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a C program for sum of n numbers using pointers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


How do you write c program to perform sum of elements of matrix using pointers with functions?

i cant write


What will be the program to arrange numbers stored in array in ascending order using pointers?

sorry


Write a c program to copy two strings using pointers?

nahi malum


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


How do you write a C program to copy to strings using pointers?

mystrcpy (char* dest, char* src) { while ((*dest++ = *src++) != '\0); }


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


How do you find the biggest of n numbers using pointers in C?

yes


Write a program to find the product of two numbers using Halving and Doubling method?

i need this answer


Write a program large number and small number among n numbers by using If statement?

12


How do you run graphics program in C?

pro c language to implement linear search using pointers


Write a program to swap two numbers using function?

swap (int *a, int *b) { *a ^= *b; *b ^= *a; *a ^= *b; }