Explain what is the difference between declaring a variable and defining a variable?
Answer / ss
Declaring variable means
Eg- int a;
Defining variable means we are giving some integer value to that a variable
Eg- a=100;
Is This Answer Correct ? | 0 Yes | 0 No |
#include<stdio.h> int main(){ int a[]={1,2,3,5,1}; int *ptr=a+4; int y=ptr-a; printf("%d",y); }
what is the difference between structure and union?
What is far pointer in c?
write the output of following code .. main() { static int a[]={10,20,30,40,50}; int *ptr=a; static int arr[2][2]={1,2,3,4}; char str[]="ABCD * 4#"; char *s=str+2; int i,j; for(i=0;i<5,i++) printf("%d",*ptr++); for(i=0;i<2;i++) for(j=0;j<2;j++) printf("%d\n",*(*(n+i)+j)); printf("%c\n%c\n%c\n",*(str+2),*s++,*--s); }
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
void main() { char c; while(c=getchar()!='\n') printf("%d",c); } o/p=11 why?
How to receive strings with spaces in scanf()
The statement, int(*x[]) () what does in indicate?
Do you know what are bitwise shift operators in c programming?
What is the use of clrscr?
Write a C program to read the internal test marks of 25 students in a class and show the number of students who have scored more than 50% in the test. Make necessary assumptions.
int a=1,b=2,c=3; printf("%d,%d",a,b,c); What is the output?