Write a program using one dimensional array to assign values and then display it on the screen. Use the formula a[i]=i*10 to assign value to an element.
Answer / ram
#include<stdio.h>
#define M 3
main()
{
int i,a[M];
for(i=0;<M;i++)
a[i]=i*10;
for(i=0;<M;i++)
printf("%d ",a[i]);
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Design an implement of the inputs functions for event mode
find A^B using Recursive function
How can you relate the function with the structure? Explain with an appropriate example.
main() { char p[ ]="%d\n"; p[1] = 'c'; printf(p,65); }
code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123
posted by surbhi just now main() { float a = 5.375; char *p; int i; p=(char*)&a; for(i=0;i<=3;i++) printf("%02x",(unsigned char) p[i]); } how is the output of this program is :: 0000ac40 please let me know y this output has come
How to reverse a String without using C functions ?
33 Answers Matrix, TCS, Wipro,
main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024
Write a C program to print look and say sequence? For example if u get the input as 1 then the sequence is 11 21 1211 111221 312211 12112221 .......(it counts the no. of 1s,2s etc which is in successive order) and this sequence is used in run-length encoding.
main() { unsigned int i=10; while(i-->=0) printf("%u ",i); }
Cau u say the output....?
¦void main() ¦{ ¦int i=10,j; ¦ j=i+++i+++i; ¦printf("%d",j); ¦getch(); ¦} ¦ output:-30 but in same question if we write as- ¦void main() ¦{ ¦int i=10; ¦ int j=i+++i+++i; ¦printf("%d",j); ¦getch(); ¦} ¦ output:-33 why output is changed from 30 to 33. Can any body answer...