Learning to Program in C (Part 07)

preview_player
Показать описание
This is part 7 in our tutorial on learning to program in C. In this video we will learn about strings and pointers in C.
Рекомендации по теме
Комментарии
Автор

This video finally got me over my C pointers hump. Thanks, Dr.

kylemallard
Автор

0:40 I think the standard way to declare a char array is like this:
char str[10];
The brackets are placed after the variable name, not after the char keyword. I know in Java you can put brackets after the char keyword, but I'm not sure if you can do this in C.

programmingyourlife
Автор

I had the following as a output to first stringfun.c:
hello
xbye

I think this program falls under undefined/inconsistent behavior?

Abu_Shawarib
Автор

#include <stdio.h>

int main(void){
int count = 99;
int *pCount = &count;
count = *pCount +1;
printf("count is now %i", count);
}

why does it return a wrong value

metaorior
Автор

Hi When I compile stringfun.c (using GCC) I get error: warning farewell unused variable and the compile is successful and on run I get
hello
x▒▒#
So I do NOT get hellobye....nor xhellobye This is not the same as your compile & run so it doesn't really help in understanding '\0' but I think I understand what your point is! :-)

rpdatutube
Автор

i'm stupid or u r complicating it !! :/

Itheb