Programming – StudyObject https://www.studyobject.com Social Learning Circle Sat, 07 Aug 2021 16:29:57 +0000 en-US hourly 1 https://wordpress.org/?v=5.5.14 https://www.studyobject.com/wp-content/uploads/2019/06/cropped-feat4-32x32.png Programming – StudyObject https://www.studyobject.com 32 32 Website Design Company in Bangalore | StudyObject https://www.studyobject.com/website-design-company-in-bangalore-studyobject/ Mon, 03 Aug 2020 11:27:54 +0000 https://www.studyobject.com/?p=2309 Website Designing is a professional art. We design website in open source based technology. There is no vendor locking involved. …

The post Website Design Company in Bangalore | StudyObject appeared first on StudyObject.

]]>
Website Designing is a professional art. We design website in open source based technology. There is no vendor locking involved. We have designed several high ranking websites.Please read our client testimonials. We design and hand over the complete control to our clients. If you are looking for transparent website costing and pricing please check the price list.

We have a team of experts working on end to end solution . We provide Linux based hosting for our clients at most affordable prices. Our web Design workflow is simple and scalable. We use PHP & mysql for all the projects.

Following are our free offerings

1.Free theme*

2.Free e-commerce payment setup

3.6 month free support

 

We also provide standalone free Audit report for high performance and high traffic website

We have featured on biggest meetup event online.

Please talk to us  

WhatsApp us or give a call at   ☎ +919916957797 or    ☎ + 917892694513

The post Website Design Company in Bangalore | StudyObject appeared first on StudyObject.

]]>
How to Do Email Marketing Free of Cost | StudyObject https://www.studyobject.com/how-to-do-email-marketing-free-of-cost-in-wordpress/ Wed, 08 Jul 2020 14:14:56 +0000 https://www.studyobject.com/?p=2223 Digital Marketing has never been on the rise as much as during lockdown. All forms of marketing are overshadowed by …

The post How to Do Email Marketing Free of Cost | StudyObject appeared first on StudyObject.

]]>
Digital Marketing has never been on the rise as much as during lockdown. All forms of marketing are overshadowed by digital marketing specially Email Marketing.

Today our focus is not on General Digital Marketing, but we will focus on the best type of marketing with respect to digital marketing. Keep Reading ! We will reveal the gold !

 Email Marketing !

Email marketing has been most effective marketing outreach as it allows to send email directly to customers with specialised offers. Also, unlike other ads you can track if the known recipient( the customer which you are sending email to) actually have clicked and landed on the website or not. In email marketing you must have email ids of the potential customers.

Let’s discuss the most interesting part! In WordPress there are so many plugins offering email marketing to any no of subscribers, but this comes with huge cost associated with it. It is not possible for a startup to spend this much amount on email.

We will discuss about how can you avoid these expensive plugins until you have deep pockets.

Which WordPress plugin to use?

Download any free email marketing plugin which supports multiple email Gateways. You can configure this email marketing plugin with Email gateways like SMTP(check with your host provider), Sparkpost(0.85 cent per thousand), sendgrid, postmark, mailgun or elastic email.

 

Which Email Gateway to use free of cost?

I would suggest to use SMTP gateway , as it comes with Host and it is free of cost. All other email gateway providers except SMTP are chargeable but still these gateways costs less than expensive email marketing plugins.

The only challenge with SMTP is that if it is not configured properly, most of your emails may land into the spam folder. So take extra precautions while configuring SMTP with email plugin.

 

Is it good to use Email marketing in Google Ads?

Google Email ads are good to use as it gives you plenty of customisation options. Google Email ads are chargeable.

 

Which Email Marketing techniques/plugins/gateways you are using ! Share your thoughts!

If you are looking to set up Email Server for sending unlimited emails  , Please reach us at [email protected]

 

Author: Rajnish K

About Author :

Rajnishk is R&D Expert ,passionate for Web Stack & an Entrepreneur . He can be reached at [email protected]

 

The post How to Do Email Marketing Free of Cost | StudyObject appeared first on StudyObject.

]]>
Have you met this Worker, It performs! | StudyObject https://www.studyobject.com/apache-mpm-worker/ Mon, 15 Jun 2020 14:19:04 +0000 https://www.studyobject.com/?p=2056 Let’s harness the power of precious CPU with Apache! We are going to discuss PHP MPM Worker which gives a …

The post Have you met this Worker, It performs! | StudyObject appeared first on StudyObject.

]]>
Let’s harness the power of precious CPU with Apache!

We are going to discuss PHP MPM Worker which gives a big performance boost to the user requests while doing the scaling. It is gold when it comes to supporting huge web traffic. We will dig into Apache MPM performance side !

Apache MPM  prefork and Apache MPM worker

Apache has two types of MPM

1.Prefork – It is non threaded and preforking web server (Does not do Child forking/threading on demand).

2.Worker – It is a multi-process, multi-threaded web server. Worker MPM uses multiple child processes with many threads for each child process. 

How to know whether it is Apache MPM prefork or Apache MPM Worker

Use Following command (It will show Server MPM type)

httpd -V

 

Server version: Apache/2.4.43 (cPanel)
Server built: May 5 2020 18:56:17
Server's Module Magic Number: 20120211:92
Server loaded: APR 1.7.0, APR-UTIL 1.6.1
Compiled using: APR 1.7.0, APR-UTIL 1.6.1
Architecture: 64-bit
Server MPM: worker
threaded: yes (fixed thread count)
forked: yes (variable process count)

 

or dump the loaded module

httpd -t -D DUMP_MODULES | grep mpm

mpm_worker_module (shared)     //if loaded module shows worker then it is MPM worker type

Prefork VS Worker

Prefork details

We will do a quick summary of apache MPM prefork, it implements non threaded and preforking web server. Apache maintains a directive named MaxRequestWorkers in its configuration which defines the Maximum number of connections that will be processed simultaneously. We suggest to choose this value based on RAM size.

Apache httpd always tries to maintain several spare or idle server processes, which stand ready to serve incoming requests. In this way, clients do not need to wait for a new child processes to be forked before their requests can be served.

Let’s discuss how exactly Apache MPM prefork uses few directives to process the requests. Following directives are used to control the request. These are configurable, I am keeping some default values to explain.

StartServers: 5                  //Apache starts 5 child processes at the moment it gets started MinSpareServers: 5      //Apache keeps minimum of 5 idle child processes MaxSpareServers: 10      //Apache keeps maximum of 10 idle child processes

 

MaxRequestWorkers: 256 //Maximum number of connections that will be processed simultaneously.

 

ServerLimit:                    

 

//It sets the upper limit on configurable number of processes. With the prefork MPM, use this directive only if you need to set MaxRequestWorkers higher than 256 (default).

 

Do not Miss the Gold : Why I Suggest to Use Apache MPM Worker !

Worker Details

There is difference in meaning of few directives when Apache MPM worker is in use.

ServerLimit: 16    

 

//Only use if MaxRequestWorkers and ThreadsPerChild needs more than 16(default) server processes. Do not set the value of this directive any higher than the number of server processes required by what you may want for MaxRequestWorkers and ThreadsPerChild.

 

MaxRequestWorkers: 400

 

//restricts the total number of threads that will be available to serve clients. 

 

MaxRequestWorkers  an integer multiple of ThreadsPerChild (default 25) and ServerLimit (16).

 

ThreadsPerChild : 25    //no of threads per child

 

You can compare serverlimit with no of cores, so lets say your CPU has 4 cores then Ideally you should set serverlimit as 4.

You may try to set serverlimit as 8 if 4 core supports hyper threading(Meaning CPU is 4 core/8 threads)

Try above combinations and share your experience in comment section. Apache MPM Worker makes use of precious CPU better than prefork.

 

Author: Rajnish K

About Author :

Rajnishk is R&D Expert ,passionate for Web Stack & an Entrepreneur . He can be reached at info@studyobject.com

The post Have you met this Worker, It performs! | StudyObject appeared first on StudyObject.

]]>
Do you need cron? | StudyObject https://www.studyobject.com/do-you-need-cron/ Fri, 12 Jun 2020 09:30:07 +0000 https://www.studyobject.com/?p=1995 Do you care about how cron works in the operating system?  Cron is time based task scheduling system. You can …

The post Do you need cron? | StudyObject appeared first on StudyObject.

]]>
Do you care about how cron works in the operating system?  Cron is time based task scheduling system. You can schedule a cron job at a particular time. It can be scheduled to check updates or any other task.

What is WordPress Cron?

WordPress cron is a mechanism defined to trigger a scheduled event on every page load. On every page load (Page load happens when anyone visits your website) wordpress cron, which is defined in wp-cron.php file checks the list of scheduled tasks which needs to run.

Imagine your website getting 1000s of visitors, the wp-cron.php will be scanned 1000s times to check for the list of scheduled tasks. This will not only take more of CPU and RAM, but also lead to additional load time for new visitors of your website. According to the report, If you website takes more than 3 seconds to load, 53% visitors will switch over to similar other websites.

We will discuss today on the Linux cron job versus WordPress con job and which one is better and how to schedule wordpress cron to optimise the use of expensive resources like CPU and RAM.

Let’s say your website does not have any visitor for a long period of time( say a week ). In this scenario, there is a certainty that your wordpress cron will not get triggered and will not do any work required to be done by wordpress cron. Due to this reason your any of scheduled tasks will not run. Even your website will not get important updates required. Let’s say you scheduled a post at 3 PM, if on that day, no one visits your website, there will be scheduling error and your post will not get published.

 

Understanding the Linux/Wordpress Scheduler Job      ( Do not Miss this Part )

 

There is a catch here, with the Linux scheduler, if the time passes and the task did not run, it will not be re-attempted if Linux scheduler is not scheduled to run with an interval. So make sure the Linux scheduler executes the cron command on an interval. Usually it makes sense to maintain a small regular interval .

 

Do the change

 

Set up the linux cron job for wordpress every five minute.

  1. Disable wordpress cron

          Add following in wp-config.php in public_html folder

          define(‘DISABLE_WP_CRON’, true);

 

2. Add below command and schedule it to run at a regular interval.

         Assuming xyz is your website.

         You can set up command via cron job tool in your account using either of below mentioned commands.

     

wget -q -O – http://xyz.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

        or

     

/opt/cpanel/ea-php-73/root/usr/bin/php /home/xyz/public_html/wp_cron.php

 

 

 

Cron plays an important role in the entire system functioning and must be handled correctly.

 

Author: Rajnish K

About Author :

Rajnishk is a Serial Entrepreneur, R&D Expert and is passionate for  Full Stack. He can be reached at [email protected]

The post Do you need cron? | StudyObject appeared first on StudyObject.

]]>
Database tricks which will blow your mind ! | StudyObject https://www.studyobject.com/database-tricks-which-will-blow-your-mind/ Tue, 09 Jun 2020 09:31:55 +0000 https://www.studyobject.com/?p=1976 Finding how much traffic your website can handle can be a big task, as everything needed to be taken into …

The post Database tricks which will blow your mind ! | StudyObject appeared first on StudyObject.

]]>
Finding how much traffic your website can handle can be a big task, as everything needed to be taken into account, be it memory , optimisation rules, page size and several other factors.

In one of the articles I mentioned about the memory optimisation for WordPress to handle high traffic. We will continue to mention many steps to use the hosting resources optimally so that maximum no of users can be supported by a website.

MYSQL Tweaks

Today we will discuss about mysql configurations which limits the no of concurrent users on your website and how can we change those to allow many more concurrent users with limited hardware resource.

We will also look at why do we get “too many connection error” on a website when there is a sudden surge in traffic. This is seen because all connections between mysql daemon is occupied by users and mysql daemon can not service any further connection request.

How to check default maximum_connections Attribute ?

The no of connections to mysql is limited by max_connections global variable. The default value you can display by executing below command in mysql command line or via phyMyAdmin client. You can also use mysql terminal. I am using phpMyadmin. The default value of max_connection is set to 150.

show variables like ‘max_connections’;

The Actual allowed connection is max_connections+1 , so a total of 151 connections is allowed with mysql. The extra connection is reserved for user with connection_admin privilege. The reason why one extra connection has been provided is to debug the issues by admin even if max no of connection is under use by unprivileged users.

 

How to change max_connections in mysql ?

Most Database connections are open and closed in fraction of seconds. According to data provided by hosting provider , the maximum no of users which can be supported on say 25 connections limits(max_connections) can be around 500. So with 150 default max_connections total no users, which can be supported can be benchmarked at 3000.

Usually most of the website traffic falls under 10000 concurrent users. We recommend to set the max_connections value at 350 so at least it can cater to 7000 users concurrently.

Please use following command to set the max_connections

set global max_connections = 350;

 

Make the change persistent

This change will not persist if mysqld is killed or the system is rebooted. You must update it in the /etc/my.cnf file if you have CentOS. On Some other operating systems the config might be in mysqld.conf.

 

Setting max_connections to higher value makes sure that the database can handle those many concurrent users. There are other factors like Bandwidth which should also be taken into account while calculating the overall number of users a site can support.

You can check no of connections with mysql db with following command

netstat | grep “mysql” | wc -l 

We will be publishing another series where we will discuss few more ways to optimise the mysql database.

 

Author: Rajnish K

About Author :

Rajnishk is a Serial Entrepreneur, R&D Expert and is passionate for Web Stack. He can be reached at [email protected]

 

Customer Testimonials

Colin Bridger

"I'm really happy to hire wordpress expert from studyobject! They looked into our web optimization rules ! It will be the base of my future projects! I strongly recommend them"

Alyssa Thompson

"Guys, you are fantastic! You created the most user friendly e-commerce interface I ever used!""

Tracie G. Murrieta

"Absolutely the best design ! It's far worth the price. Thank you for such a great design for our requirement!"

Wiley Troy

"The most intuitive Interface I have ever used.They provide Incredible transitions and features!"

The post Database tricks which will blow your mind ! | StudyObject appeared first on StudyObject.

]]>
How to Optimise WordPress for High Traffic | StudyObject https://www.studyobject.com/how-to-optimise-wordpress-for-high-traffic/ https://www.studyobject.com/how-to-optimise-wordpress-for-high-traffic/#comments Mon, 08 Jun 2020 11:10:08 +0000 https://www.studyobject.com/?p=1895 Memory plays an important part in any software application. Memory allocation is crucial when dealing with high traffic WordPress website. …

The post How to Optimise WordPress for High Traffic | StudyObject appeared first on StudyObject.

]]>
Memory plays an important part in any software application. Memory allocation is crucial when dealing with high traffic WordPress website.

High Traffic Website

While working on WordPress over a decade, we always wondered if a WordPress site can handle huge traffic. The answer is yes. WordPress is built on mysql and PHP. WordPress has done huge improvement over time.

We will discuss few important steps to optimise your WordPress site to handle huge traffic.

WP_MEMORY_LIMIT allows to specify the amount of memory that can be consumed by a single PHP script. This setting also needs to be changed in the event you receive a message such as “Allowed memory size of xyz bytes exhausted”.

WP_MEMORY_LIMIT

WP_MEMORY_LIMIT is defined in wp-config.php and The default value of WP_MEMORY_LIMIT is 40MB.
define( 'WP_MEMORY_LIMIT', '40M' );

WP_MEMORY_LIMIT variable limits the usage of memory (RAM) by a single PHP script to 40MB.

What is the use of WP_MEMORY_LIMIT in wordpress?

Let’s say your WordPress website has multiple plugins. Each plugin needs to run to provide different features. With the WordPress default setting each PHP script (theme, plugin etc) can get a maximum of 40 MB of memory to run. Many plugins might not be able to run with 40 MB memory limitation. Heavy plugins like woocommerce needs minimum of 128MB of memory to run. Check woocommerce memory req here.

Change the value of WP_MEMORY_LIMIT  to higher value depending on the plugin/theme requirement.I am changing as per woocommerce memory requirement. 
define( 'WP_MEMORY_LIMIT', '128M' );

After update, 128MB is the maximum memory which can be used by any of plugins/ theme.

Does it mean that WP_MEMORY_LIMIT value should be very high like 1024 MB? The Answer is no. 
Because it will allow each plugin/theme to use 1024 MB of RAM. Poorly optimised plugin/theme can use more memory and exhaust the ram. 
It is advisable to keep the value of WP_MEMORY_LIMIT to as low as possible.
The best approach is to keep it to a value required by a plugin which needs highest memory.

Will it work with the above change?

The updated value will not take effect if php memory setting is not updated.

Go to PHP.ini file and change the line as follows

 memory_limit = 128M ;

what should i do if i do not have access to PHP.ini file?

change below line in .htaccess file public_html folder as follows

php_value memory_limit 128M

What is the use of WP_MAX_MEMORY_LIMIT in WordPress?

WordPress has provided another variable WP_MAX_MEMORY_LIMIT in wp-config.php for memory optimisation. WP_MAX_MEMORY_LIMIT is mainly used for admin activity in the backend which is not that concurrent in nature.

INTERESTING FACT 

You must set WP_MEMORY_LIMIT for applying memory restriction on each php script so that the WordPress website does not face memory exhaustion even if many concurrent front end users are accessing the website. If any front end activity takes place which causes a plugin and theme to use more memory than WP_MEMORY_LIMIT , then WordPress uses WP_MAX_MEMORY_LIMIT to redefine the memory restriction.

Difference between WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT

The WP_MEMORY_LIMIT  defines the default limit set mainly for front-end task initiated by visitors of the WordPress website, but it can also be raised up to WP_MAX_MEMORY_LIMIT for high end task executed in the backend due to the front-end visitor or for any backend admin activity.

What is your thought, we will love to hear in comment section.

We recommend a site audit . For more optimisations , Give it a Read Here.

Author: Rajnish K

About Author :

Rajnishk is a Serial Entrepreneur, R&D Expert and is passionate for Web Stack. He can be reached at [email protected]

 

 

The post How to Optimise WordPress for High Traffic | StudyObject appeared first on StudyObject.

]]>
https://www.studyobject.com/how-to-optimise-wordpress-for-high-traffic/feed/ 1
How much Traffic can a WordPress Site handle ? | StudyObject https://www.studyobject.com/how-much-traffic-can-a-wordpress-site-handle/ https://www.studyobject.com/how-much-traffic-can-a-wordpress-site-handle/#comments Wed, 27 May 2020 12:25:28 +0000 https://www.studyobject.com/?p=1835 WordPress Biggest Lessons in a Nutshell !   My Journey with wordpress I have been a big wordpress fan and …

The post How much Traffic can a WordPress Site handle ? | StudyObject appeared first on StudyObject.

]]>
WordPress Biggest Lessons in a Nutshell !

 

My Journey with wordpress

I have been a big wordpress fan and fell in love with this CMS as soon as i started using it a decade back. I have seen wordpress growth since the time it was a pure blogging platform. I must admit that with the support of biggest CMS ecosystem in the world it stands out clearly from the rest.

 

Why I use WordPress

 

I have used this CMS for many of our websites and achieved amazing results . One of my wordpress site loads in 0.8 seconds. There was never a time when i felt wordpress was not robust enough as a CMS. There have been many major updates in wordpress . It is getting better everyday with new features. The best part is that any feature needed in wordpress comes as a plugin.

It becomes easier to plug or unplug the feature with plugin. One need to have clear understanding of the requirement for a website to be built in wordpress. I started digging more on the wordpress scaling part as one of my site needed to clock 10000-100000 requests per hour. I was waking up everyday with questions like whether wordpress will support this kind of traffic. I searched across Google and found mixed response. Most of people on quora suggests that wordpress is not a capable platform for scaling specially when it comes to e-commerce. Keep Reading..

 

WordPress Traffics

 

I have been with wordpress for long and have not found anything that makes it difficult for wordpress to handle that kind of traffic. It is made of simple architecture with php and mysql database. Unless there is any limitation with php and mysql there can not be any limitation with wordpress. The developer of wordpress website must understand the underlying concept fully to harness it’s full capability.

 

Which Hosting Plan to choose and what next

 

If you are using it, use it well with required capacity like ram and hard disk (better use ssd) as per requirement of the website. There are so many hosting providers offering good deal with respect to storage. One need to have good experience at analysing right hosting provider.

Once you get to have good hosting provider, it is second tough task to get everything working perfectly on wordpress. I had a situation where with VPS hosting with 1000 person trying to do shopping on wordpress site , we were getting error as “error establishing database connections”. We had CDN configured but we were still getting this issue. It was a shopping website which was seeing this kind of traffic and was expected to handle even more traffic.

One thing is very clear that more server resources like RAM and Hard Disk are needed to support traffic like this. But it is always advisable to optimise web resources to handle spike in traffic.

 

What to do to make wordpress faster

 

It always helps to build your website with minimum of plugins and light theme.  Wordpress site remain soft target of hackers as most of the site admins do not update their website regularly.

Updating wordpress website is again a difficult task. The new update in plugin or theme can break your website. So maintain caution and never update those on live website. One must update and test on staging site before making any change on live website.

 

Spike in Traffic

 

If your website is growing and hitting traffic like 10000-100000 per hour then it needs optimization on plugins , theme and sever resources.You can also avail CDN service. It is good to place load balancer on  hosting side.

 

One must do a site audit  of a wordpress website to handle that much traffic.

I recently did a video session on handling high volume traffic on WordPress.tv and  youtube channel 

Supercharge your website ! Reach us for more details !

Author: Rajnish K

About Author :

Rajnishk is R&D Expert and is passionate for WordPress Stack. He can be reached at [email protected]

The post How much Traffic can a WordPress Site handle ? | StudyObject appeared first on StudyObject.

]]>
https://www.studyobject.com/how-much-traffic-can-a-wordpress-site-handle/feed/ 1
C Interview Questions | StudyObject https://www.studyobject.com/c-interview-questions/ Sat, 11 Apr 2020 07:49:38 +0000 https://www.studyobject.com/?p=1278 C interview questions are basic questions but are tricky. We are providing the list of 10 C interview questions with …

The post C Interview Questions | StudyObject appeared first on StudyObject.

]]>
C interview questions are basic questions but are tricky. We are providing the list of 10 C interview questions with answers.

C questions are mostly of program type so practice these questions.

1.What is the difference between sizeof and strlen in C

#include<stdio.h>
int main()
{
char a[]=”hello”;
char *p=”hello”;
printf(“%d—%d—“,sizeof(a),strlen(a));
printf(“%d—%d”,sizeof(p),strlen(p));
return 0;
}
Output:
6—5—4—5
Pointer always returns its size with sizeof
Sizeof operator includes “null” at the end of string

2.write a program to do string reversal without pointer.

#include<stdio.h>
#include<string.h>int main() {
char A[100]=”ITTINA”, temp;
int i, j = 0;printf(“nEnter the string : %s” , A);i = 0;
j = strlen(A) – 1;while (i < j) {
temp = A[i];
A[i] = A[j];
A[j] = temp;
i++;
j–;}printf(“nafter reversal: %s” , A);}

3.write a program for string reversal using pointers
write a program to reverse the string using pointers

#include<stdio.h>
#include<string.h>void reverse(char* p);int main()
{char p[]=”hello”;reverse(p);printf(“%s”,p);return 0;
}
void reverse(char* p)
{
char *start = p;
char *end = p+strlen(p)-1;
char tmp;
while(end>start)
{
tmp=*end;
*end=*start;
*start=tmp;
start++;
end–;
}
}

4.write a program to reverse a string using recursion

#include<stdio.h>char * rev(char *);
int main()
{
char A[10] = “HELLO”;
printf(“%s”,A);
char *p = rev(A);
printf(“—–>%s”,p);return 0;
}char* rev(char *p)
{
static int i=0;
static char m[10];if(*p)
{
rev(p+1);
m[i++]=*p;}return m;
}

5.what happens when NULL pointer is derefernced.

#include<stdio.h>
int main()
{
int *p=NULL;
printf( “printing p %d”,*p);
}
NULL points to 0x00 which is protected by kernal so it does nt allow it to derefence
Output:-
Segmentation fault

6.what is the output of below program

#include<iostream>int main()
{char *p=”HELLOn”;printf(“%s”,p);printf(p);printf(“HELLO”);}Output:-
HELLO
HELLO
HELLO

7.write a program to find if a processor is little endian or big endian

#include<stdio.h>
int main()
{
int a= 0x12345678;
char *p=(char*)&a;
printf(“%x”,*p);
if (*p==0x78)
printf(“little endian”);
}
Output:
78little endian

8.write your own atoi program

atoi converts string to integer value
#include <stdio.h>
int Atoi(char *mystring)
{
int result = 0;
int i;
for ( i = 0; mystring[i] != ‘�’; ++i)
{
result = result*10 + mystring[i] – ‘0’; // ‘0’ is 48 – we need to subtract 48 from each assci to get the integer
}
return result;
}
int main()
{
char mystring[] = “194567”;
int finalvalue = Atoi(mystring);
printf (“%d “, finalvalue);
return 0;
}
Output-
194567

9.compare your own atoi with original atoi

Always remember original atoi in std lib does nt process characters like abcd and if given alongwith integer it silently ignores it
#include <stdio.h>
#include <stdlib.h> /* atoi */
int Atoi(char *mystring)
{
int result = 0;
int i;
for ( i = 0; mystring[i] != ‘�’; ++i)
{
result = result*10 + mystring[i] – ‘0’;
}
return result;
}
int main()
{
char mystring[] = “123a”;
int finalvalue = Atoi(mystring);
printf (“%dn “, finalvalue);
int at =atoi(mystring);
printf (“%d “, at);
return 0;
}
Output:-
1279
123

10.Explain function pointer by writing a program

#include<stdio.h>
int display();
int main()
{
int (*functionPtr)(); //declaration of function pointer
functionPtr=display;
(*functionPtr)(); //making a call to function via function pointer
}
int display()
{
printf(“Function pointer explained”);
}
Output:-
Function pointer explained

The post C Interview Questions | StudyObject appeared first on StudyObject.

]]>
Internship at Studyobject https://www.studyobject.com/internship-in-whitefield/ Sun, 05 Apr 2020 08:05:13 +0000 http://themes.vibethemes.com/wplms/skins/demo2/?p=1891 Our internship program detail Number of Interns required – 2 Qualification Needed:- 1.Solid understanding of algorithms, operating system. Good knowledge of …

The post Internship at Studyobject appeared first on StudyObject.

]]>
Our internship program detail

Number of Interns required – 2

Qualification Needed:-

1.Solid understanding of algorithms, operating system. Good knowledge of html, css, php, mysql .Experience in writing high quality code.

2.Proactive with eager to learn new technologies.

3.Students in 3rd year/ final year of B.TECH/ Fresh B.Tech Pass-out from Tier- 1/Tier-2 college

4.Personal Interview will be done remotely via videocall.

5.The internship period is for 3 months.

Benefits of internship at our office

1.Internship includes real life problem solving and building blocks for career.

2.Learn from industry experts

3.Learn more in startup culture.

4.Internship Experience Certificate

Contact – [email protected]

The post Internship at Studyobject appeared first on StudyObject.

]]>