Here I have listed some selected problems or questions related to pointers in C++. Solve them to increase your programming skills.
Problem #1:
#1: I_Like_C++
#2: 10101010
#3: gramming Skills
#4: 18
Since this article has become a bit too long, I have broken it into one more part.
Hope this helps!
Labels:
C/C++ Language
Problem #1:
// Problem or Question in C++ // -------------------------- // Problem related to pointers // for increasing programming // skills #include<iostream.h> void main() { char ch[]="I_Like_C++"; cout<<*&*&ch; }Problem #2:
// Problem or Question in C++ // -------------------------- // Problem related to pointers // for increasing programming // skills #include<iostream.h> void main() { int i,*p,**q,***r; i=10; p=&i; q=&p; r=&q; cout<<i<<*p<<**q<<***r; }Problem #3:
// problem related to pointers #include<iostream.h> void main() { char ch[]="Programming Skills"; char *s=ch; cout<<s+++3; }Problem #4:
// Problem related to pointers
#include<iostream.h>
void main()
{
int ar[2][2][2]={1,2,3,4,5,6,7,8};
cout<<***ar;
cout<<ar[1][1][1];
}
ANSWERS:#1: I_Like_C++
#2: 10101010
#3: gramming Skills
#4: 18
Since this article has become a bit too long, I have broken it into one more part.
Hope this helps!
Responses
0 Respones to "Increase your Programming Skills Part-1"
Post a Comment