great help...thanks andreas and jim
Type: Posts; User: nmn
great help...thanks andreas and jim
thanks barney...but i am unfamiliar with the concept of sequence point...can u clarify it a little...thanks
#include<stdio.h>
int main(){
int a[]={10,20,30,40};
int i=3,x;
x=1*a[--i]+2*a[--i]+3*a[--i];
printf("%d",x);
return 0;
}
i expected it to print 100 but it prints 60 instead
ok...got it!!
thanks...
thanks a lot kurt !! :)
though can you or someone provide a little explanation since n is a double-dim array and *n should denote the value at its base address
also how can you expect the function to return 3 different values at the same time
this code:
int ask(inventory item[], int range);
should be:
int ask(struct inventory *item, int range);
and correspondingly make changes in the function definition
this code:
#include<stdio.h>
int main()
{
int n[3][3]={{1,2,3},{4,5,6},{7,8,9}};
printf("\n %d %d %d", *n , n[0][0], n[2][2]);
isn't *n same as n[0][0]??
i dont know what exactly you mean by typical, but it is highly useful when you create functions to perform specific tasks and need a value that the function computes in another part of your program
#include<stdio.h>
void main()
{
int n[3][3]={{1,2,3},{4,5,6},{7,8,9}};
printf("\n%d %d %d", *n , n[0][0], n[2][2]);
}
is there a condition for checking for paragraph breaks??
if i start reading individual characters from a text file having the following content:
"music, Indian classical dance, and other aspects of Indian
culture.
It is also a movement with...
the following code
letters = strlen(words1);
char visible_words[letters];
will not work as you will have to allocate memory dynamically
the following code will be correct
allocate sufficient space for tab1[], tab2[], and tab3[] in your calling function according to the values of n and m...you can pass the double-dim array to the fuction as *mat
char s[10];
printf("%c", s[15]);
if char s[10] represents a character array of 10 elements then why does printing s[15] give a garbage value instead of showing an error at accessing an element...
got it...thanks! :)
i'm new to programming and would like to know whether the maximum no. of characters that an array of characters
eg. char c[10]
would be 10 or 11(adding the null character)
thanks!!