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 |
int a=1; printf("%d %d %d",a++,a++,a); need o/p in 'c' and what explanation too
main() { int i=10,j=20; j = i, j?(i,j)?i:j:j; printf("%d %d",i,j); }
What is data _null_? ,Explain with code when u need to use it in data step programming ?
void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }
Is the following code legal? typedef struct a { int x; aType *b; }aType
# include <stdio.h> int one_d[]={1,2,3}; main() { int *ptr; ptr=one_d; ptr+=3; printf("%d",*ptr); }
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates.
19 Answers Amazon, BITS, Microsoft, Syncfusion, Synergy, Vector,
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
void func1(int (*a)[10]) { printf("Ok it works"); } void func2(int a[][10]) { printf("Will this work?"); } main() { int a[10][10]; func1(a); func2(a); } a. Ok it works b. Will this work? c. Ok it worksWill this work? d. None of the above
Predict the Output: int main() { int *p=(int *)2000; scanf("%d",2000); printf("%d",*p); return 0; } if input is 20 ,what will be print
main() { int i, j, *p; i = 25; j = 100; p = &i; // Address of i is assigned to pointer p printf("%f", i/(*p) ); // i is divided by pointer p } a. Runtime error. b. 1.00000 c. Compile error d. 0.00000
main() { int k=1; printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE"); }