Common issues with code blocks The most common error people see if things don’t work is a message like can’t find compiler executable in your search path (GNU GCC compiler) Sloution: Go to settings in the upper part click compiler
Test Code
First Program in C – test code Write your test code in empty file. (How to open empty file) main() { printf(“Hello User”); } Build and Run your code to press F9 function Key. Build is a process of converting
Installation of Code::blocks
Download code::blocks Here you will learn how to setup environment in order to make programs in C language and convert into an executable. Follow the instructions given below: Goto this website http://www.codeblocks.org/downloads Click “Download the binary release”. Select your operating
Introduction to C language
Introduction C language C language was developed by Dennis Ritchie in 1972 at AT & T’s Bell Labs, New Jersy, USA. C language is inspired from B language which was developed by Ken Thompson. 80% code of UNIX operating system
Queue in Data Structure
QUEUE 1. How many stacks are required to implement a queue? (a) 1 (b) 2 (c) 3 (d) 4 2. How many queues are needed to implement a stack? (a) 1 (b) 2 (c) 3 (d) 4 3. Suppose implementation
Stack in Data Structure
1. Which of the following is an application of Stack data structure? (a) Evaluation of postfix expression (b) Function calls management (c) Balancing of symbols (d) All of the above 2. What data structure would you mostly likely see in
Sorting in Data Structure
1. Select the sorting that always has a time complexity O(n2 ),irrespective of the condition of array. (a) Bubble sort (b) Selection sort (c) Quick sort (d) Merge sort 2. You have to sort a list L consisting of a
Linked List in Data Structure
1. Let P be a singly linked list. Let Q be the pointer to an intermediate node x in the list. What is the worst-case time complexity of the best known algorithm to delete the node x from the list?
Pointers in C
1. #include “stdio.h” void fun(int *ptr) { *ptr = 30; } int main() { int y = 20; fun(&y); printf(“%d”, y); return 0; } (a) 20 (b) 30 (c) Compiler Error (d) Runtime Error 2. int main() { char *ptr
Strings in C
1. main() { char c[] = “SCABHOPAL”; char *p =c; printf(“%s”, p + p[4] – p[3]) ; } (a) PAL (b) HOPAL (c) BHOPAL (d) SCABHOPAL 2. #include “stdio.h” int main() { char str[] = “ILoveYou”; printf(“%s %s %s\n”, &str[5],