Tuesday 19 March 2013

diamond shape in c/c++

We will now post some shapes using c/c++ language.It will be defiantly helpful.If you need some more code for different kinds of shape then please email us-cprogtec@gmail.com
code----
#include<stdio.h>

int main(){
int i,j,n;
printf("put the size of the diamond");
scanf("%d",&n);
for(i=n;i>=1;i--){
for(j=1;j<=i;j++){
printf(" ",j);
}
for(j=0;j<=(n-i)*2;j++){
printf("*");
}
for(j=i;j>=1;j--){
printf(" ",j);
}
printf("\n");
}
for(i=1;i<=n;i++){
for(j=1;j<=i;j++){
printf(" ",j);
}
for(j=0;j<=(n-i)*2;j++){
printf("*");
}
for(j=i;j>=1;j--){
printf(" ",j);
}
printf("\n");
}

return 0;
}


Monday 18 March 2013

range of char data type

we all know about char data type.char data type has a limit and is 0 to 255.If you want to remember all the char  then it will be vary difficult. But if you learn through a program about  this data type the it would be very easy for.So here is a program showing all the char-------------------
#include<stdio.h>
int main()
{
  
    int i,n,a,z,b,c;

printf("List of CHARACTER");
    for(i=0;i<=255;i++){
    printf("%c %d\n",i,i);
    }

}

if you have any problem then ask us.ou email id-cprogtec@gmail.com.please visit c programming and technology .
give comment also.

Saturday 16 February 2013

Write Your First Computer Program In C/C++

After installing Code Blocks you can follow these steps.First you can see this kind of picture ---


Then just click  on the "create new project">>"Files">>"C/C++ source">>"Go"----
then click on "C" or "C++">>"Next"---

then click the "..." see in the picture--

see next picture.you have  to give a name of your program.---

click "save".then click "finish".
after that you can see a page like this-

you have to write codes here.now we shall start writing  codes.
please write these codes-


#include<stdio.h>
int main()
{
    printf("hello world");
    return 0;
}

you see the pic also---

now you have written your first program.in the printf("  ");  whatever you write you can see as output. after clicking the "build and run " button you can see a box like this---
so you see your first program.
Now i am giving you a program for practise--
write a program that will give output --"I want to be a good programmer,wont't you"
please practise.send your answers and questions here-cprogtec@gmail.com
if your answer is correct then we will publish your name in the blog also.
thank you.


On The Road To Start


There are three things you need , the computer (if the Internet connection is good), C language compiler and enough time. Do not rush. Watching is just not enough for learning programming.You need to type the code also. Whenever I do ask you a question, you should think about it. If for two - three hours, or two - or three days time as well, there is no harm, but rather a long time to solve any problems in the habit of thinking is very important.

So come, let compiler to get C - compiler does for some. If you are a Linux or Mac user, but the best is gcc. In linux it is installed before.For Windows  you use Codeblocks (http://www.codeblocks.org/). This is a free and open source IDE (Integrated Development Environment) and the Mac and Linux. Normally in a text editor (such as Notepad, gedit, keraita) using the code can be compiled with the compiler, then it can be run. However, in most of the IDE (IDE) has own text editor and compiler.

Codeblocks download and install it directly from the site you can http://www.codeblocks.org.
It is about 74mb i use 10.05  edition.you can use  the newer version also.
You can use visual studio also.But i like to use codeblock. Because visual studio is a heavy software.And takes a lots of time to start.

We shall try to give you lots of program so that you can practise. and we are also asking you send your problems.you can ask questions also.we will try our hard best to give the answer.our email id-cprogtec@gmail.com

So you should download visual basic or Code block for start writing programs.

Best wishes for all.

Friday 15 February 2013

ASCII Character (0-127)



000
nul
032
 sp
064
@
096
`
001
soh
033
!
065
A
097
a
002
stx
034
"
066
B
098
b
003
etx
035
#
067
C
099
c
004
eot
036
$
068
D
100
d
005
enq
037
%
069
E
101
e
006
ack
038
&
070
F
102
f
007
bel
039
'
071
G
103
g
008
bs
040
(
072
H
104
h
009
tab
041
)
073
I
105
i
010
if
042
*
074
J
106
j
011
vt
043
+
075
K
107
k
012
np
044
,
076
L
108
l
013
cr
045
-
077
M
109
m
014
so
046
.
078
N
110
n
015
si
047
/
079
O
111
o
016
dle
048
0
080
P
112
p
017
dc1
049
1
081
Q
113
q
018
dc2
050
2
082
R
114
r
019
dc3
051
3
083
S
115
s
020
dc4
052
4
084
T
116
t
021
nak
053
5
085
U
117
u
022
syn
054
6
086
V
118
v
023
etb
055
7
087
W
119
w
024
can
056
8
088
X
120
x
025
ern
057
9
089
Y
121
y
026
eof
058
:
090
Z
122
z
027
esc
059
;
091
[
123
{
028
fs
060
092
\
124
|
029
gs
061
=
093
]
125
}
030
rs
062
094
^
126
~
031
us
063
?
095
_
127


You can  know about these characters later.I will give a program for this.Then you will understand about these characters also.But please remember about these characters,its very helpful.
ask questions and give suggestions.