I understood the difference. I can see in experiment. If I don't use the static before variable then, every function call, the value of variable doesn't change. if the I use the static before...
Type: Posts; User: vead
I understood the difference. I can see in experiment. If I don't use the static before variable then, every function call, the value of variable doesn't change. if the I use the static before...
I did the two experiment. I printed value with static and without static
Program with static
#include<stdio.h>
void loop (void)
{
static int count = 0;
printf("Number : %d...
I didn't get your point What is the meaning of those lines why you are incrementing counter in loop function
What happen when we use static storage class in front of variable name
If I use static or if I don't use static in this program, nothing change
What the benefits of static storage class in...
I understood where I was confuse
addition with no return type but passing value
#include <stdio.h>
void addition(int x, int y);
int main(void)
{
int a = 10; int b = 20;
I am getting this error: void value not ignored as it ought to be in my program. What is this error and how to remove it?
#include <stdio.h>
void addition(int x, int y);
int main(void)
{
so when we don't initialize array it will store garbage value
#include<stdio.h>int main(){
int array[4];
printf("array element : %d \n", array[0]);
printf("addaress of array : %d...
Both initialized and uninitialized aray print the same value zd. Working size for both will same
I am confused on two line's what happen when they run on machine
1.What happen when this line execute a[4]; ?
what would be the size of array for int a[4]; i think it would be 16
2.What...
What happen in this case when int a[4];
How much size array take 16 bytes because int take one byte to one one integer value so this array will store 4 integer that mans it will take 16 bytes
...
What would be size of int a[4];
#include<stdio.h>int main ()
{
int a[4];
int n = sizeof(a);
printf (" Size of array %d ", n);
return 0;
}
Thanks to all of you
#include<stdio.h>int main ()
{
int array[10], size, number, found;
int i = 0;
printf("Enter size : ");
scanf("%d", &size);
for(i = 0; i < size;...
If I do this, then both of statement's, if statement and else statement will print because they will be under the for loop
#include<stdio.h>
int main (){
int array[10], size, number,...
if i initialize variable i then it execute
number = array[0];
I am assuming first number of array is specif number and if it's not then compare with next index
#include<stdio.h>int main...
I am trying to find the specific number in array. if user enter number ie 5 then program should be able to find that the number is present in array or not if it present in array then print number...
so we don't need integer array terminator in c
I will do this
#include <stdio.h>int main()
{
int i = 0;
int array[5] = {0,2,3,4,0};
while (array[i] != 5)
{
How do we terminate integer array in while loop
#include <stdio.h>int main()
{
int i;
int array[5] = {0,2,3,4,0};
while (array[i] != 0)
{
#include <stdio.h>#include <string.h>
int main(void)
{
char string[10] [10], temp[10];
int i, j, n;
printf ("\n Pramot user to Enter size: ");
scanf ("%s", &n);
...
I want to short string in Alphabetical Order
#include <stdio.h> int main(void)
{
char string[10] [10], temp;
int i, j, n;
printf ("\n Pramot user to Enter size: ");
scanf...
Okay but still unclear
does it mean's that the array storing four number's and if I want to print them , Then I have to write loop for it
So the 'for' loop is only used to print array number
What happen when we write this line
intarray[4]= {2,2,3,4};
does it mean's that the array storing four number's and if I want to print...
What happen when this program execute
#include<stdio.h>
int main (void)
{
int i;
int array[4]= {2,2,3,4};
for(i=0; i<4; i++)
{
what is use of for loop after decleration of array
#include<stdio.h>int main (void)
{
int i;
int array[4]= {2,2,3,4};
for(i=0; i<4; i++)
{
printf("print array element : %d \n",...
when I remove address of variable in this program they it doesn't show result and if put Adrress & then it show result
#include <stdio.h>
int main()
{
int Number;
printf("Enter...