访问字符串数组

时间:2016-04-29 06:31:31

标签: c string pointers

如何访问以下字符串数组中<input class="btn add-to-cart-btn" onclick="window.open('{{ product.metafields.google.custom_label_0 }}');" type="submit" value="More Info At {{ product.vendor }}"/> aarm的字母{/ 1}}?

基本上,我是C的新手,想看看如何访问字符串数组中的特定字符 我使用以下代码定义数组:
c

2 个答案:

答案 0 :(得分:3)

以下代码为您提供&#34; a&#34;手挽手

str1[0][0]; 

以下代码为您提供&#34; c&#34;用糖果

str1[1][0]; 

答案 1 :(得分:0)

基本上你拥有的是一个数组数组,所以:

char c = str1[0][1]; // value of c would be thr 'r' from arm