Tag: C

C এর সাথে Python প্রোগ্রামিং এক্সটেনশন (Python Extension Programming with C)

C এর সাথে Python প্রোগ্রামিং এক্সটেনশন C, C++ অথবা Java প্রোগ্রামিং এর যেকোন কোড Python script এর সাথে ইন্টেগ্রেট/ রূপান্তর করা যায়, যাকে Python এক্সটেনশন বলে। Python এক্সটেনশন ফাইলগুলো স্বাভাবিক C লাইব্রেরীর মত, Unix অপারেটিং সিস্টেম এ .so ফরম্যাট ও Windows মেশিনে.dll ফরম্যাটের হয়।   এক্সটেনশন লেখার পূর্বশর্ত Python এক্সটেনশন লিখতে হলে Python হেডার ফাইল এর দরকার পড়ে …

Continue reading

Use sorting criterion in sort function

/* The following code example is taken from the book  * “The C++ Standard Library – A Tutorial and Reference”  * by Nicolai M. Josuttis, Addison-Wesley, 1999  *  * (C) Copyright Nicolai M. Josuttis 1999.  * Permission to copy, use, modify, sell and distribute this software  * is granted provided this copyright notice appears in …

Continue reading

C++ code : Read file content

#include <iostream> #include <fstream> using namespace std; int main() {   ifstream in(“test”, ios::in | ios::binary);   if(!in) {     cout << “Cannot open input file.\n”;     return 1;   }   double num;   char str[80];   in.read((char *) &num, sizeof(double));   in.read(str, 14);   str[14] = ‘\0’; // null terminate str   cout …

Continue reading

Sort objects stored in deque

/* The following code example is taken from the book  * “The C++ Standard Library – A Tutorial and Reference”  * by Nicolai M. Josuttis, Addison-Wesley, 1999  *  * (C) Copyright Nicolai M. Josuttis 1999.  * Permission to copy, use, modify, sell and distribute this software  * is granted provided this copyright notice appears in …

Continue reading

A simple C++ Program code

#include <iostream> #include <fstream> using namespace std; int main() {   ifstream in(“test”, ios::in | ios::binary);   if(!in) {     cout << “Cannot open input file.\n”;     return 1;   }   double num;   char str[80];   in.read((char *) &num, sizeof(double));   in.read(str, 14);   str[14] = ‘\0’; // null terminate str   cout …

Continue reading

valarray with double value inside

/* The following code example is taken from the book  * “The C++ Standard Library – A Tutorial and Reference”  * by Nicolai M. Josuttis, Addison-Wesley, 1999  *  * (C) Copyright Nicolai M. Josuttis 1999.  * Permission to copy, use, modify, sell and distribute this software  * is granted provided this copyright notice appears in …

Continue reading

Print minimum, maximum, and sum of the valarray

/* The following code example is taken from the book * “The C++ Standard Library – A Tutorial and Reference” * by Nicolai M. Josuttis, Addison-Wesley, 1999 * * (C) Copyright Nicolai M. Josuttis 1999. * Permission to copy, use, modify, sell and distribute this software * is granted provided this copyright notice appears in …

Continue reading

সি প্রোগ্রামিং এ মেমোরি ব্যবস্থাপনাঃ Memory Management in C Programming

সি প্রোগ্রামিং এ মেমোরি ব্যবস্থাপনা রিদওয়ান বিন শামীম এই অধ্যায়ে সি প্রোগ্রামিং এ ডাইনামিক মেমোরি ম্যনেজমেন্ট নিয়ে আলোচনা করা হবে। সি প্রোগ্রামিং ল্যাঙ্গুয়েজে মেমোরি বণ্টন ও ব্যবস্থাপনার জন্য কয়েক ধরনের ব্যবস্থা আছে, তাদেরকে হিডার ফাইলে রাখা হয়। এধরনের ফাংশন গুলোকে এভাবে দেখানো যায়ঃ S.N. Function and Description 1 void *calloc(int num, int size); Num ইলিমেন্টের …

Continue reading

সি এবং অ্যারে : Array in C

int marks[4][10] = {{80, 70, 92, 78, 58, 83, 85, 66, 99, 81}, {75, 67, 55, 100, 91, 84, 79, 61, 90, 97}, {98, 67, 75, 89, 81, 83, 80, 90, 88, 77}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};   #include <stdio.h> int main() { int marks[4][10] = {{80, 70, 92, …

Continue reading

লেকচার – ০৪: সি++ প্রোগ্রামিং – লজিক (C++ Programming – Logic)

http://www.youtube.com/watch?feature=player_embedded&v=0RSZNF-2cx4