เราสามารถใช้ Visual studio มาเขียนภาษา C และ compile ภาษา C ได้ โดยมีวิธีการทำดังนี้
1. เราต้องสร้าง Project ขึ้นมาก่อน โดยไปที่ New Project เลือก Visual C++ > Win32 Console Application

2. ให้เราเลือก Application type เป็น Console application ส่วน additional options เป็น empty project

3. พอเราสร้าง project เสร็จแล้ว ให้ทำการ สร้างไฟล์ โดย ไปคลิกขวาที่ Source Files เลือกAdd > New item แล้วเลือก Visual C++ เลือก C++ file แต่ตรงไฟล์ name เราจะใช้นามสกุล .c จากตัวอย่างสร้างชื่อว่า test.c


4. แล้วทำการเขียนโค้ด ภาษา C ลงไป แล้วทดลองสั่ง compile and runโดยกด ที่ icon ปุ่ม play เขียวๆ

ตัวอย่างโค้ด
#include<stdio.h>
/*
Array size (row)*(column)
array[row][colum]
*/
int ar[3][3]=
{
1,2,3,
4,5,6,
7,8,9
};
int main(void)
{
/*
Specific element form [0] to [2]
*/
printf("array 2D is [row][colum]\n");
printf("%d\n",ar[0][2]);
getchar();
return 0;
}
5. อย่าลืมตอนเขียนให้ใส่ getchar(); ด้วยจะทำให้โปรแกรมหยุดรอเราจนกว่าจะกดปุ่ม หลังจากกด compile and runแล้วเราก็จะเห็นว่าโปรแกรมทำงานขึ้นมาในหน้าต่าง console
