Deprecated: Implicit conversion from float-string "1533884788.122" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1533884788.122" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1533884788.122" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1533884788.122" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1533884788.122" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1533900598.889" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1533900598.889" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1533900598.889" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1533900598.889" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1533900598.889" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1533910429.705" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1533910429.705" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1533910429.705" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1533910429.705" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1533910429.705" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1533911507.478" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1533911507.478" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1533911507.478" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1533911507.478" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1533911507.478" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594
#Go Classroom DataTypes / GATE Overflow for GATE CSE
450 views
0 votes
0 votes

https://gatecse.in/data_types_operators_in_c/ Q7. 

 

#include <stdio.h>

int main()

{

    char *p = "Hello World";

    char q[] = "Hello World";

    printf("%zd %zd", sizeof p, sizeof *p);

    printf("\n");

    printf("%zd %zd", sizeof q, sizeof *q);

    return 0;

}

sizeof p- size of pointer which is compiler dependent

sizeof q-size of the char array

Is it correct? What will sizeof *p and sizeof *q give?

I am getting the output as 

4 1

12 1

 

Please log in or register to answer this question.

Related questions


Deprecated: Implicit conversion from float-string "1534009346.689" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1534009346.689" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1534009346.689" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1534009346.689" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1523705434.646" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1523705434.646" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1523705434.646" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1523705434.646" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1539748834.459" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1539748834.459" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1539748834.459" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1539748834.459" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803
502
views
0 answers
0 votes
srestha asked Aug 11, 2018
502 views
Is my analysis correct?I analyze code that if it will take 1->2->3 and 4->1->2 as inputthen output will be reverse of 5->3->2 i.e. 2->3->5Why code is showing runtime erro...
426
views
0 answers
0 votes
ankitgupta.1729 asked Apr 14, 2018
426 views
I am not getting the problem which is given below. Please helpMatrix transposition must be a familiar task. This problem is a generalization of it. We can assume matrix ...
468
views
1 answers
0 votes
sidjha57 asked Jan 18, 2022
468 views
Why am I not able to access the course content that is to enroll in the courses on go classroom?It says that it has been ended on 21st July is there any other way to acce...
241
views
0 answers
0 votes
sakharam asked Oct 17, 2018
241 views
What is Squareroot(L) and Square(L)?
Total PHP MySQL Other RAM
Time (ms) % Time (ms) % File count Time (ms) % Query count Time (ms) % Amount %
Setup 3.9 9% 2.5 6% 72 1.7 4% 2 0.0 0% 569k 50%
Control 12.8 32% 1.8 4% 5 11.5 28% 12 0.0 0% 283k 25%
View 1.6 3% 1.6 3% 12 0.0 0% 0 0.0 0% 5k 0%
Theme 16.8 42% 3.7 9% 15 13.2 33% 3 0.0 0% 268k 23%
Stats 4.8 11% 0.1 0% 0 4.7 11% 1 0.0 0% 0k 0%
Total 39.9 100% 9.6 24% 104 31.1 77% 18 0.0 0% 1127k 100%