main()
{
char *str1="abcd";
char str2[]="abcd";
printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd"));
}
Answer / susie
Answer :
2 5 5
Explanation:
In first sizeof, str1 is a character pointer so it gives you
the size of the pointer variable. In second sizeof the name
str2 indicates the name of the array whose size is 5
(including the '\0' termination character). The third sizeof
is similar to the second one.
Is This Answer Correct ? | 14 Yes | 3 No |
Cluster head selection in Wireless Sensor Network using C programming language.
#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }
main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }
#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }
write a program in c to merge two array
Which version do you prefer of the following two, 1) printf(ā%sā,str); // or the more curt one 2) printf(str);
how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.
0 Answers Mbarara University of Science and Technology,
void main() { while(1){ if(printf("%d",printf("%d"))) break; else continue; } }
main() { char c; int i = 456; clrscr(); c = i; printf("%d", c); } a. 456 b. -456 c. random number d. none of the above
Declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
Finding a number multiplication of 8 with out using arithmetic operator
Display the time of the system and display the right time of the other country