I am a Student.. final year CS...
ok sir..here goes.. given gyan[]={10,20,30,40,50}; func(ptr++) when called takes ptr[0] ie., 10 to its module does 10+1=11 n returns 11 to the...
ya ok sir..if i want to see the array again after the current for loop...again from 0 to 4 in another loop..y am i not getting the correct answerss??
void fun(int *i); void main( ) { int gyan[] = { 10, 20, 30, 40, 50 }; int i, *ptr ; ptr = gyan; for ( i = 0 ; i <4 ; i++ ) { fun(ptr++);...
yes sir...forgot dat was a post increment.. so a+b n then a is incremented.. thank u sir..:)
Thank u for giving me a clear view..:)
# define TWICE(i) 2*i # define TWO(i) i+i main () { int no, sum, product; no = 1; sum = -- TWICE(no); --sum;...
main() { int a=10,b=20,c; c = a+++b; printf("%d",c); } output is 30.. how does this work???
Thank u..:)
sorry i=(1,0)?1:0; i get 0; all i got is that if the second argument is 1 then evaluates to true..else false.. but wat is the use of it???
if i give if(1,0) printf("true"); else printf("false"); then it is always evaluating to false... but if i give i=(1,0)?1:0;...
Thank u ..:)
In C language sir..
i have seen at many places where condition is to be evaluated.. if(a) {} if(!a) {} for(i=0;!a;i++) {} if(1){} if(!9){} and things lyk...
yeah it certainly does help.. Thank U sir..:)
Okay...!!! So... 'e'-'a'=101-97=4 And since p is a pointer, p+4 indicates the control to jump to p[4]...and thats where 2 resides..and since %s...
if i ask the user his preferred data type how can i tell it to the compiler about it?? i want to do this because i want function take arguments at...
I am extremely sorry sir..i never meant that u donot know it.. Thank u for guiding me.. n p indicates the starting position here means it points...
I think pointer accessing array elements.. i dont know when i run that code i got output 2011... if u can understand how it works..do explain me..
#include<stdio.h> void main() { char a[]="Gate2011"; char *p=a; printf("%s", p + p[3] - p[1]); } Outputs 2011 Can somebody me...
Separate names with a comma.