what is the output of following program type def int integer # define int chat void main () { int i= 65; int *ptr = &i; int *j = | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

what is the output of following program type def int integer # define int chat void main () { int i= 65; int *ptr = &i; int *j =

29th Sep 2021, 6:39 AM
Abubakar Sk
Abubakar Sk - avatar
10 Answers
+ 4
Your code is incomplete, please post full code. And also use relevant tags next time...
29th Sep 2021, 6:46 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
+ 4
1. Your question got cut up because you put it in the title instead of the question field. 2. Use relevant and only relevant tags. 3. Run it yourself and find out.
29th Sep 2021, 6:47 AM
Simon Sauter
Simon Sauter - avatar
+ 3
Well, did you run it?
29th Sep 2021, 6:55 AM
Simon Sauter
Simon Sauter - avatar
+ 3
Errors ... 1. No inclusion of <stdio.h>. You use printf(). 2. typedef requires original type, followed by type alias. https://en.cppreference.com/w/cpp/language/typedef 3. #define preprocessor directive is better written without space between '#' and 'define'. Compiler may not care, but you should, for the sake of readability and syntax consistency. http://www.cplusplus.com/doc/tutorial/preprocessor/ * NOTE: The typedef and #define lines are pointless, might as well remove them. 4. Standard C requires the main function to return `int` not `void`. https://en.cppreference.com/w/c/language/main_function 5. The number of format specifier and number of data to be printed in call to printf() does not match. There are 3 format specifier, but there are 4 data to be printed. 6. Use of %d specifier for `sizeof` operator, and pointer arithmetic result is inappropriate. For error #5 and #6 refer to http://www.cplusplus.com/reference/cstdio/printf/
29th Sep 2021, 7:32 AM
Ipang
+ 1
what is the output of following program type def int integer # define int chat void main () { int i= 65; int *ptr = &i; int *j = ptr; j++; printf ("%d %d %d",!i,size of (i),j-ptr,*&*ptr);}
29th Sep 2021, 6:51 AM
Abubakar Sk
Abubakar Sk - avatar
+ 1
This is the question
29th Sep 2021, 6:52 AM
Abubakar Sk
Abubakar Sk - avatar
0
Syntax error. This should be c++ right? If so this code is invalid.. Or did you mean: #include <stdio.h> int main () { int i= 65; int *ptr = &i; int *j = ptr; j++; printf ("%d %d %d",!i,sizeof(i),j-ptr,*&*ptr); return 0; } Then it will return: 0, 4, 1
29th Sep 2021, 6:58 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
0
Complete the code buddy.
1st Oct 2021, 4:37 AM
Ritesh Kumar Gupta
Ritesh Kumar Gupta - avatar
- 1
2) Consider below two different declarations of String. char str[] = "Intelligraphics"; char p* = "Intellingraphies"; Answer whether the following statements are valid or invalid? a) str ++ is valid / invalid: b) P++ is valid / invalid): ) S+r [1] + + is valid / invalid: d) (*p)++ is valid / invalid:
29th Sep 2021, 7:21 AM
Abubakar Sk
Abubakar Sk - avatar
- 1
Write a function pointer declaration that returns integer and takes a char-pointer and integer value
29th Sep 2021, 7:28 AM
Abubakar Sk
Abubakar Sk - avatar