C Programming and Technical

Q. What is command line argument?

A. Getting the arguments from command prompt in c is known as command line arguments. In c main function has three arguments.
They are:
Argument counter
Argument vector
Environment vector

Read Solution (Total 0)

C Other Question

Q. What are differences between sizeof operator and strlen function?

A. sizeof is keyword of c which can find size of a string constant including null character but strlen is function which has been defined string.h and can find number of characters in a string excluding null character
Q. void main(){
int x=5,y=10,z=15,val;
val=sum(x,(y=0,z=0,y),z);
clrscr();
printf("%d",val);
getch();
}
sum(int x,int y,int z){
return x+y+z;
}

A. 20

Explanation: In the above program comma after Y=0 &Z=0 are behaving as operator