Nicely explained sir but one think i want to tall you is that you gave last example of program in this program you have made a mistake to giving float pointer value to the integer pointer value in last line.
Sir me thoda confuse hu kyuki last me jo apne value print krwai h vo integer type ki h like- *(int*)p. Or uper float me apne- float a=100; liya h. Itna part sir dobara samjha dijiye sir g
Hai Vikas Sir, First of all thank u, Your teaching is super cool and simple. Sir, am following ur tutorials sir and I have been strucked in void pointer tutorial. Sir I would like to initialize a string say "HELLO" and I need to get the address as well as the value using pointer variable either using void pointer or using simple pointer variable or both. I tried in linux system but am getting Warning :assignment from incompatible pointer type [ enabled by default ]. code : ====== #include main() { char a[ ]="HELLO" ; char *ptr ; ptr=&a ; //it is wrong ptr=a; //it is right printf ("%s ",a); Printf("%x ",&a); printf ("%s ",ptr); printf ("%x ",*ptr); } Please help me Sir.
your 3rd and 4th print statements are wrong. 1- in 3rd u have used %s as format specifier but asking to print address of ptr which is the base address of string a. use printf("%p ",ptr); 2- in 4th , u want to print character stored in string but used %x identifier. Second thing pointer does not print complete string because it use to point one memory location at at a time .So please use for loop and pointer increment operator for printing whole string. 3- ur " p " is in capital in 2nd printf.
#include int main(){ int a = 320; char *ptr; ptr =( char *)&a; printf("%d ",*ptr); return 0; } sir this code is running and giving answer 64 what is the meaning of ptr =( char *)&a; this line? please can you explain?
variable a is integer type and pointer is character type so for storing integer's address in ptr explicit typecasting is done . Ans is 64 because a signed character(default) can support values ranging from -128 to +127. Therefore 320-256 equals 64.
ok character is only byte long means it can support only 8 bits.More precisely from 00000000 to 11111111 in binary or 0 to 255 in decimal but we want to store 320 in char type memory location . Initially var a was integer type but after typecasting we converted it in character type. so 320 can not be stored in this memory location. after counting 255 it again starts from 0 and goes up to 64 (320-256)
sir, i watch your all videos .it is so helpful and nicely explained.
i clear all my exam ..
don't need for tutions...
thanks you very much ...
Thank u so much sir, for this video. Now, I could clear my doubt about void pointer.
Grt sir seriously never had this kind of lecture ever before thanx for all this knowledge
Sir you are unique in our India
your teaching style is very smooth so a student can learn hard topics in lesser time
sir,the way of understanding is very good.
Hi sir, Thanks for nice video with best explonation.
Sir,
Your all the lectures are very superb!
Nicely explained sir but one think i want to tall you is that you gave last example of program in this program you have made a mistake to giving float pointer value to the integer pointer value in last line.
thank uhh too much sir....how much time I will say thanks it will less for your teaching ...
😍😍
Hello
Knowledgeable explanation....loved it
Sir your teaching is beautiful
aap bohat aacha teach krte ho .....
sir .your videos are easy to learn.can you make a tutorial on null pointer in c,,
Reply plzz
Unsigned int x=-1;
int y;
y=~0;
then what will be value of x and y.
Is x==y.
Thanks for taking your time to explain this
Perfect explanation
Sir viod pointer mein dereferencing ke example meim *(float*)p ?
Thankyou sir
Good Noon Sir,
This video is very helpful. I want to know about Automorphic number in C program . Thank u
Aparna Panda, Okay we'll prepare a tutorial for you :)
Vikas Chandra Pandey OK ,Sir.
Very nice sirg
Sir me thoda confuse hu kyuki last me jo apne value print krwai h vo integer type ki h like- *(int*)p.
Or uper float me apne- float a=100; liya h.
Itna part sir dobara samjha dijiye sir g
Yes bhai wo float he sir confuse hogaye
Bahot hard bahot hard......
what is the difference between void * and const void* ?
Hai Vikas Sir,
First of all thank u, Your teaching is super cool and simple.
Sir, am following ur tutorials sir and I have been strucked in void pointer tutorial.
Sir I would like to initialize a string say "HELLO" and I need to get the address as well as the value using pointer variable either using void pointer or using simple pointer variable or both.
I tried in linux system but am getting
Warning :assignment from incompatible pointer type [ enabled by default ].
code :
======
#include
main()
{
char a[ ]="HELLO" ;
char *ptr ;
ptr=&a ; //it is wrong
ptr=a; //it is right
printf ("%s
",a);
Printf("%x
",&a);
printf ("%s
",ptr);
printf ("%x
",*ptr);
}
Please help me Sir.
your 3rd and 4th print statements are wrong.
1- in 3rd u have used %s as format specifier but asking to print address of ptr which is the base address of string a.
use printf("%p
",ptr);
2- in 4th , u want to print character stored in string but used %x identifier. Second thing pointer does not print complete string because it use to point one memory location at at a time .So please use for loop and pointer increment operator for printing whole string.
3- ur " p " is in capital in 2nd printf.
Thank you
Hello sir, I request u to make video about Null pointer..
Hlw sir gd evening 😊 i am lakki student of BCA 2nd year
I have a ques. Size of void pointer is ?
very nice
Nice sir video
sir I need the difference between void pointer and a null pointer
bahut badia sir...thanks
bhi
Practical kaise hoga iska please batao....
make a Video on generic pointers
thanku so much sir
dhanywad sir..:)
What thumbnail indicate and what really it is.
sir can u give tutorial on volatile
Very nice sirg
sir I want to know about far pointer and near pointer
sir plz int main or void main k difference ke bare men bataeye kuch
What u have done @ 14:15....
It will be...
printf("%f",*(float*)p);
Bhai itna comman sense hota hai
why # symbol is use after header file in c++ or c
Nice sir
thank u so much
You're welcome :)
Hello
make video on volatile
Sir aap theory bhi dijiye
plz upload linked lists and queues.
sir void konsa data type hota hai please help sir
Sir apne float data type lia or baad me use int me point kar dia vo galat hai
#include
int main(){
int a = 320;
char *ptr;
ptr =( char *)&a;
printf("%d ",*ptr);
return 0;
}
sir this code is running and giving answer 64
what is the meaning of ptr =( char *)&a; this line?
please can you explain?
variable a is integer type and pointer is character type so for storing integer's address in ptr explicit typecasting is done . Ans is 64 because a signed character(default) can support values ranging from -128 to +127. Therefore 320-256 equals 64.
Thanks lot for the clear explanation...but what is that 320?
i'm not getting ur question, please explain again
Why did you substacted 256 from 320?? what is the significane of 320?
ok
character is only byte long means it can support only 8 bits.More precisely from 00000000 to 11111111 in binary or 0 to 255 in decimal
but we want to store 320 in char type memory location . Initially var a was integer type but after typecasting we converted it in character type. so 320 can not be stored in this memory location.
after counting 255 it again starts from 0 and goes up to 64 (320-256)
pandey ji is the boss,thanxx :)
Sihon Utchas Bappy, You're welcome :)
Not thanks sir because you have not any examples of void pointer
void walk kia hota hai plz help sir
sir, please tell me what i should learn sql or mysql "I am interested in java"
sir, i learn web applicatin in java help me
plz give video null pointer on C++
what is null pointer
Tharun Reddy, we'll prepare a tutorial for you :)
WHat is dangling pointer
Good
Thank you :)
Kash ki example bhi likh diya hota aapne sir
Mere laptop mein to nahi ho Raha pointer program kuch gadabd ho re
sir, please upload a video for null pointer. also I want to know about Automorphic number in c program.
+Sourav Nag, A Pointer with NULL value is called NULL Pointer which points nowhere.
e.g. int *ptr=NULL;
ok sir.thanks
int a=100;
char *p;
p=&a;
this is not an error.
Bro its an error
you can execute this first
#include"iostream"
#include"conio.h"
using namespace std;
void main()
{
int a;
char *p;
couta;
cout
aree ye toh perpendicular h 😂😂..
srry no offense plz 😛
get to the point man!!!! :(
Making a 15 min video with so less information is kind of killing people's time.
The purpose is to make you understand thoroughly.
@@bilalshahid5831 I hope people are smart enough to understand it in atleast one go. Speaking the same thing again and again. Ain't he?
very good